Fix inconsistent directory separators in the autoloader.

It looks like this was the cause of a version 5.0 bug reported in #378.
This commit is contained in:
Yahnis Elsts 2022-10-28 20:46:32 +03:00
parent 32f0079038
commit 81be284da7
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ if ( !class_exists(Autoloader::class, false) ):
if ( strpos($className, $this->prefix) === 0 ) {
$path = substr($className, strlen($this->prefix));
$path = str_replace('_', '/', $path);
$path = str_replace(array('_', '\\'), '/', $path);
$path = $this->rootDir . $path . '.php';
if ( file_exists($path) ) {