Welcome Guest, Not a member yet? Register   Sign In
HMVC broken in php 7.3 -- help
#10

(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:


PHP Code:
public function set_class($class)
{
    
$suffix $this->config->item('controller_suffix');
    
        if( $suffix && strpos($class$suffix) === FALSE)
    {
        
$class .= $suffix;
    }

    
parent::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.



THANK YOU !!!
JUST CHANGE THIS LINE

if( $suffix && strpos($class, $suffix) === FALSE)

AND FIX IT !!!!
Reply


Messages In This Thread
HMVC broken in php 7.3 -- help - by admin0 - 12-13-2018, 10:13 AM
RE: HMVC broken in php 7.3 -- help - by admin0 - 12-13-2018, 10:54 AM
RE: HMVC broken in php 7.3 -- help - by InsiteFX - 12-14-2018, 03:55 AM
RE: HMVC broken in php 7.3 -- help - by admin0 - 12-14-2018, 10:54 AM
RE: HMVC broken in php 7.3 -- help - by skunkbad - 12-14-2018, 12:33 PM
RE: HMVC broken in php 7.3 -- help - by daycry - 03-28-2019, 09:56 AM
RE: HMVC broken in php 7.3 -- help - by abacoin - 09-28-2019, 06:47 PM
RE: HMVC broken in php 7.3 -- help - by gtozadori - 12-14-2018, 10:10 PM
RE: HMVC broken in php 7.3 -- help - by synanhero - 08-05-2019, 06:19 AM
RE: HMVC broken in php 7.3 -- help - by TamasD - 08-27-2019, 05:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB