I just upgraded my CodeIgniter from version 2.2 to 3.1.10. I replace system folder and its contents and rename all controller name to capitalized and everything else needed. Then I got this error:
A PHP Error was encountered
Severity: Warning
Message: Declaration of MY_Router::set_directory($dir) should be compatible with CI_Router::set_directory($dir, $append = false)
Filename: core/MY_Router.php
Line Number: 0
Inside application/core there are some files:
- MY_Route.php
- MY_Input.php
- MY_Controller.php
- etc
UPDATED: here is a piece of code in MY_Route
function set_directory($dir)
{
// Allow forward slash, but don't allow periods.
$this->directory = str_replace('.', '', $dir) . '/';
}
I'm sure that the problem is caused by these files but I have no idea what to do. I read the documentation how to upgrade but no clue about this problem. Anyone can help me please?
core/MY_Router.php, theset_directorymethod