Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 (/showthread.php?tid=69505) Pages:
1
2
|
Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - koficypher - 12-05-2017 Just until yesterday and until i had upgraded to php 7.2 i got this error saying thIs PHP Code: <div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;"> system info: php7.2 on ubuntu 17.10 lamp stack RE: Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - Narf - 12-06-2017 You've done nothing wrong, except you haven't really put thought into this before posting about it. each() is deprecated in PHP 7.2 and the extension you're using uses the function - that's all there's to be said about it. RE: Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - InsiteFX - 12-06-2017 This is not TESTED! But you can try it, if not it will be a start to fixing the depreciated each() function. Change line 83 or 84 - in third_party/MX/Modules.php - PHP Code: (is_array($module)) ? list($module, $params) = each($module) : $params = NULL; Add this code and see if it will fix the problem for you. PHP Code: if (is_array($module)) Remember this is not TESTED... RE: Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - koficypher - 12-06-2017 (12-06-2017, 06:16 AM)InsiteFX Wrote: This is not TESTED! Thanks for your help and i appreciate it. However i tried it and it seems that the list function needs to be assigned to some variable. i got this error by the way... Code: Type: ParseError RE: Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - InsiteFX - 12-06-2017 Alright, here is another one you can try, again not TESTED. PHP Code: (is_array($module)) ? list($module, $params) = $this->makeEach($module) : $params = NULL; Add that new method to the bottom of the Module file. RE: Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - koficypher - 12-06-2017 (12-06-2017, 08:36 AM)InsiteFX Wrote: Alright, here is another one you can try, again not TESTED.Okay so that worked but i had to do some few changes to your code. i made the function you asked me to place at the bottom a static function and called it in that line using Self::makeEach so i ended up having something like this PHP Code: (is_array($module)) ? list($module, $params) = Self::makeEach($module) : $params = NULL; And that did it... Thanks InsiteFX RE: Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - InsiteFX - 12-06-2017 Right I just noticed that I left off the $this-> Anyways glad you got it to work I' am sure it will bite some of the other users. RE: Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - koficypher - 12-06-2017 (12-06-2017, 09:39 AM)InsiteFX Wrote: Right I just noticed that I left off the $this-> haha Thanks again RE: Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - ivantcholakov - 12-06-2017 I found a patch in my code about this deprecation. Probably it is based on a snippet I've seen before, but I don't remember from where it has been taken. Code: // Modified by Ivan Tcholakov, 21-JAN-2017. RE: Deprecation Error with Wiredesign's HMVC extension on PHP 7.2 - gusti - 02-08-2018 i have got the same error |