HMVC show strpos issue

 

strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior


Answer
 

Just Update the function in Router.php File Path: application\third_party\MX\Router.php

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

        $suffix = (string) $this->config->item('controller_suffix');
        if ($suffix && strpos($class, $suffix) === FALSE)
        {
            $class .= $suffix;
        }
        parent::set_class($class);
    }




Recent Question