View Single Post
  #31  
Old 06-29-2017, 06:31 AM
 
aim aim is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 928
 

Default Re: X-Cart v4.7.8: Facebook E‑commerce, Mandrill, Amazon Feeds, Shipping Easy

Quote:
Originally Posted by herber@wirehub.nl
I've just upgraded 4.7.8 and I cannot acces the /admin/general.php page anymore, the following error occurs which blanks out the page in our case:

Code:
[29-Jun-2017 13:13:29 UTC] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /public_html/admin/general.php:178 Stack trace: #0 /public_html/admin/general.php(528): test_dirs_rights() #1 {main} thrown in /public_html/admin/general.php on line 178

It is related to this line, $rc[] is line 178

Code:
$rc[] = array ( 'directory' => $testdir, 'exists' => is_dir($dir), 'writable' => is_writable($dir), ); }
The PHP version is 7.1.6.
My /admin/general.php file is 100% identical to a clean 4.7.8.

If I declare $rc = array(); INSIDE the foreach, the error disappears and /admin/general.php can be accessed again.

It doesn't fix it completely, the list of directories that it checks for write permission is only 1 folder long, only the /var/upgrade folder.

Hi,

It is very strange.

Do you have
$rc = array();
in the line 164?

Thank you.
__________________
Sincerely yours,
Ildar Amankulov
Head of Maintenance group
Reply With Quote