cancel
Showing results for 
Search instead for 
Did you mean: 

Deprecated Functionality: The each() function is deprecated.

SOLVED

Deprecated Functionality: The each() function is deprecated.

Hi all,

 

I've been searching the forums and stackexchange all day trying to find a solution to this problem. I'm new to Magento, and I installed CE v2.2.5 with sample data on an Ubuntu server running PHP 7.0. While installing a theme, I received this message when executing a command in terminal:

 

Deprecated Functionality: The each() function is deprecated. This message will be supressed on further calls in /path/to/magento/vendor/colinmollenhour/cache-backend-file/File/php on line 81

 

I've tried using PHP 7.1 as well with a fresh install – still receive the same error. (I am well aware that Magento 2 is not compatible with PHP 7.2). I've also tried turning off deprecation warnings in my PHP config file, that didn't work either.

 

I received this same error when trying to execute a reindex command.

 

Is there any fix or workaround for this?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Deprecated Functionality: The each() function is deprecated.

Solved the issue! My PHP-CLI was still set to version 7.2 – which is incompatible with Magento 2.2.5.

 

I set it to version 7.0 and now everything works perfectly.

View solution in original post

1 REPLY 1

Re: Deprecated Functionality: The each() function is deprecated.

Solved the issue! My PHP-CLI was still set to version 7.2 – which is incompatible with Magento 2.2.5.

 

I set it to version 7.0 and now everything works perfectly.