View Single Post
  #10  
Old 11-13-2013, 04:14 PM
 
michaelt13 michaelt13 is offline
 

Newbie
  
Join Date: Nov 2013
Posts: 2
 

Default Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)

Quote:
Originally Posted by Ksenia
Hi Steve,

Thank you for letting us know.

We have reuploaded these patches:
php5.3.x-patch-2010-04-12_4.1.12.tgz
php5.3.x-patch-2010-04-12_4.2.0.tgz
php5.3.x-patch-2010-04-12_4.2.1.tgz
php5.3.x-patch-2010-04-12_4.2.2.tgz
php5.3.x-patch-2010-06-15_4.0.19.tgz

We have implemented the workaround, the changes are in init.php

- $x_error_reporting = $x_error_reporting & !(E_DEPRECATED |
E_USER_DEPRECATED);
+ $x_error_reporting = $x_error_reporting & ~(E_DEPRECATED |
E_USER_DEPRECATED);


After applying the patch, if $debug_mode = 2, PHP notices will be recorded into the logs, but not displayed.

To completely fix these warnings/notices, a very large patch ( 60-80 commitments) is required, so because of large scope of work the team of architects decided not to dig into it further, as the problem is not critical. We're concentrating on the current branch instead.

I used your trick and it solved a few problems, but I still running into these warnings:

Code:
Warning: Invalid argument supplied for foreach() in /home/rebe/public_html/shop/prepare.php on line 240 Warning: Invalid argument supplied for foreach() in /home/rebe/public_html/shop/prepare.php on line 245 Warning: Invalid argument supplied for foreach() in /home/rebe/public_html/shop/prepare.php on line 251 Warning: Invalid argument supplied for foreach() in /home/rebe/public_html/shop/prepare.php on line 254 Warning: Invalid argument supplied for foreach() in /home/rebe/public_html/shop/prepare.php on line 307 Warning: reset() expects parameter 1 to be array, string given in /home/rebeccac/public_html/shop/prepare.php on line 314 Warning: Invalid argument supplied for foreach() in /home/rebeccac/public_html/shop/prepare.php on line 307 Warning: reset() expects parameter 1 to be array, string given in /home/rebe/public_html/shop/prepare.php on line 314 Warning: Invalid argument supplied for foreach() in /home/rebe/public_html/shop/prepare.php on line 307 Warning: reset() expects parameter 1 to be array, string given in /home/rebe/public_html/shop/prepare.php on line 314 Warning: Invalid argument supplied for foreach() in /home/rebe/public_html/shop/prepare.php on line 307 Warning: reset() expects parameter 1 to be array, null given in /home/rebe/public_html/shop/prepare.php on line 314 Warning: Invalid argument supplied for foreach() in /home/rebe/public_html/shop/prepare.php on line 317
__________________
X-Cart 4.1.9
Reply With Quote