Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 3 HMVC has been broken
#1

Using this HMVC plugin in Codeigniter. (https://bitbucket.org/wiredesignz/codeig...niter-3.x/)

Running fine in another server, but in this server I am getting this error!

A PHP Error was encountered

Severity: 8192

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

Filename: MX/Router.php

Line Number: 239

Backtrace:

File: /var/www/project.test/public/application/third_party/MX/Router.php
Line: 239
Function: strpos

File: /var/www/project.test/public/application/third_party/MX/Router.php
Line: 101
Function: _set_default_controller

File: /var/www/project.test/public/index.php
Line: 324
Function: require_once
Reply
#2

Which PHP versions are you running?
Reply
#3

10 seconds on Google:
https://stackoverflow.com/questions/5620...s-in-the-f
Somebody even mentions Codeigniter HMVC in comments.
Reply
#4

There are a lot of updates to fix HMVC and you will need to search the Forums here to get them all.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(This post was last modified: 03-10-2023, 12:14 AM by JackToncatridr.)

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

public function set_class omegle shagle voojio($class)
    {
    //  $suffix = $this->config->item('controller_suffix');
    //  if (strpos($class, $suffix) === FALSE)

    $suffix = (string) $this->config->item('controller_suffix');
    if ($suffix && strpos($class, $suffix) === FALSE)
    {
        $class .= $suffix;
    }
    parent:Confusedet_class($class);
}
After this it is working fine!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB