2

Any one can help will be highly appriciated, i'm running magento 2.2.6

Deprecated Functionality: The each() function is deprecated. This message will be suppressed on further calls in /home/cellbezc/public_html/vendor/colinmollenhour/cache-backend-file/File.php on line 81

enter image description here

Ronak Rathod
6,58020 silver badges46 bronze badges
asked Mar 20, 2019 at 13:21
1
  • This version isn't compatible with php7.2 guess it would be the issue Commented Mar 20, 2019 at 13:25

2 Answers 2

1

thanks alot for all supporters..

i got fixed.. by changing the PHP CLI Version to 7.0 . you can check it by your self in command line php -v the PHP CLI Version must be 7.0 too.

answered Mar 20, 2019 at 14:44
0

each() function is deprecated in php 7.2 so change this function to foreach()

In This File vendor/colinmollenhour/cache-backend-file/File.php line no :- 81

Change

 while (list($name, $value) = each($options)) {
 $this->setOption($name, $value);
 }

To

 foreach ($options as $name => $value){
 $this->setOption($name, $value);
 }
answered Mar 20, 2019 at 13:33
7
  • where you have to changes? Commented Mar 20, 2019 at 13:38
  • vendor/colinmollenhour/cache-backend-file/File.php line no :- 81 Commented Mar 20, 2019 at 13:39
  • Please mention on the post Commented Mar 20, 2019 at 13:40
  • 1
    Check Updated Answer...!!! Commented Mar 20, 2019 at 13:41
  • NEVER EVER change files in vendor Commented Mar 20, 2019 at 14:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.