Re: 404 Page not found - 1.9.3.8 fully patched - P... - Magento Forums
cancel
Showing results for 
Search instead for 
Did you mean: 

404 Page not found - 1.9.3.8 fully patched - PHP 7.2 patch - The each() function is deprecated

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

404 Page not found - 1.9.3.8 fully patched - PHP 7.2 patch - The each() function is deprecated

I was getting 404 errors everywhere with 7.2, 7.0 worked fine.

 

After a lot of frustration I edited a bit index.php to output some errors and picked up this deprecation error:

Deprecated functionality: The each() function is deprecated. This message will be suppressed on further calls in lib/Zend/Cache/Backend.php on line 79

 

https://github.com/OpenMage/magento-mirror/blob/1ed39d11b6c40b1e9a05d933460b97f4d021baef/lib/Zend/Ca...

 

 

while (list($name, $value) = each($directives)) {

 

 


I fixed it by replacing the line with:

 

 

foreach ($directives as $name => $value) {


P.S. is anyone aware how to report bugs for magento 1.9.x php7.2 patch? I tried to report a bug, can't pick a type and version at https://magento.com/tech-resources/bug-tracking/report/

 

1 REPLY 1

Re: 404 Page not found - 1.9.3.8 fully patched - PHP 7.2 patch - The each() function is deprecated

After a bit of searching, there's more zf1-related php7. 2 discussion and projects:
https://github.com/zendframework/zf1/issues/747
https://github.com/zendframework/zf1/issues/748
https://github.com/zf1s

 

Edit: I have finally managed to report the bug:

https://magento.com/tech-resources/bug-tracking/issue/index/id/1914/