HMVC broken in php 7.3 -- help - 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: HMVC broken in php 7.3 -- help (/showthread.php?tid=72393) Pages:
1
2
|
HMVC broken in php 7.3 -- help - admin0 - 12-13-2018 Hi, I am using the HMVC and on php7.3, I get this: Code: A PHP Error was encountered Though this is a CI forum, I do not know how to ask help from the HMVC page: https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc If someone knows what to do, please let me know. Thanks RE: HMVC broken in php 7.3 -- help - admin0 - 12-13-2018 posting the code in question as well: Quote:public function set_class($class) RE: HMVC broken in php 7.3 -- help - InsiteFX - 12-14-2018 You can try this and see if it works, not tested I do not have HMVC installed right now. PHP Code: public function set_class($class) Let me know how it turns out. RE: HMVC broken in php 7.3 -- help - admin0 - 12-14-2018 Hi, $pos = strpos($class, $suffix); still returns the same error: Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior. This seems to work, but not sure how this will affect .. $pos = strpos($class, chr($suffix)); RE: HMVC broken in php 7.3 -- help - skunkbad - 12-14-2018 I'm looking through the HMVC code, and I see nowhere that controller_suffix is set to a config item. The way CodeIgniter works, if a config item doesn't exist, then it's NULL or FALSE (doesn't matter). So, that being the case, if the needle is a boolean or null, then you could do something like this: PHP Code: public function set_class($class) You could probably also cast $suffix to string, which may be appropriate if controller_suffix was meant to be an empty string: PHP Code: $suffix = (string) $this->config->item('controller_suffix'); I don't use HMVC, so I can't test this, but if I'm right that the config item for controller_suffix is not set anywhere, then this is probably your answer. RE: HMVC broken in php 7.3 -- help - gtozadori - 12-14-2018 Hi, I was having the same problem, I made changes similar to those that were indicated, the only difference was that I added the controller_suffix in the configuration parameters, because when I looked at the problem earlier this week, I noticed that it did not exist. But that's it, it worked! RE: HMVC broken in php 7.3 -- help - daycry - 03-28-2019 (12-14-2018, 12:33 PM)skunkbad Wrote: I'm looking through the HMVC code, and I see nowhere that controller_suffix is set to a config item. The way CodeIgniter works, if a config item doesn't exist, then it's NULL or FALSE (doesn't matter). So, that being the case, if the needle is a boolean or null, then you could do something like this: Maybe run this: $suffix = $this->config->item('subclass_prefix'); RE: HMVC broken in php 7.3 -- help - synanhero - 08-05-2019 just change application/third_party/MX/Router.php line 239 from this PHP Code: public function set_class($class) to this PHP Code: public function set_class($class) tested RE: HMVC broken in php 7.3 -- help - TamasD - 08-27-2019 (08-05-2019, 06:19 AM)synanhero Wrote: just change application/third_party/MX/Router.php line 239 To me this worked but with a little tweak: PHP Code: public function set_class($class) RE: HMVC broken in php 7.3 -- help - abacoin - 09-28-2019 (12-14-2018, 12:33 PM)skunkbad Wrote: I'm looking through the HMVC code, and I see nowhere that controller_suffix is set to a config item. The way CodeIgniter works, if a config item doesn't exist, then it's NULL or FALSE (doesn't matter). So, that being the case, if the needle is a boolean or null, then you could do something like this: |