Post by quintal » Wed Jan 06, 2021 2:08 am

I get this message on a theme that I am using with my opencart 2.3.0.2:
Unknown: The each() function is deprecated. This message will be suppressed on further calls in /..../Number.php on line 293

This is what is writen on that line in that php file:

reset($units);
list($unit, ) = each($units);

return (string) $dimension . $unit;
}

I already understand it has to do with the PHP version, which is set at 7.2 (can't set it to older versions) and the part of 'each' should be rewriten to 'foreach', but I can't figure out how to do that correctly in this situation...
Can anybody help?

New member

Posts

Joined
Sat Dec 01, 2012 4:15 am

Post by IP_CAM » Wed Jan 06, 2021 2:22 am

in What Theme ?
number.php is NOT a default OC 2.3.0.2 File.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by quintal » Wed Jan 06, 2021 3:34 am

Does that matter?
It's a theme from a third party (theme Janzo) and it works fine so far. I only get that message above the page.
I already fix the same message from another page myself, because I had found a, as good as, same phrase to change and that worked, but I'm not able to figure out how to change it in this php...

New member

Posts

Joined
Sat Dec 01, 2012 4:15 am

Post by IP_CAM » Wed Jan 06, 2021 3:47 am

Does that matter?
Not anymore, I already moved it into commercial Forum Section,
where such (obviously custom Code related) topics belong. :D

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by quintal » Wed Jan 06, 2021 4:24 am

Thanks, sorry I wasn't aware of that, thought genel section would do...

New member

Posts

Joined
Sat Dec 01, 2012 4:15 am
Who is online

Users browsing this forum: No registered users and 218 guests