From 81be284da76f12c8751b477b2a0fa44364d26f84 Mon Sep 17 00:00:00 2001 From: Yahnis Elsts Date: Fri, 28 Oct 2022 20:46:32 +0300 Subject: [PATCH] Fix inconsistent directory separators in the autoloader. It looks like this was the cause of a version 5.0 bug reported in #378. --- Puc/v5p0/Autoloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Puc/v5p0/Autoloader.php b/Puc/v5p0/Autoloader.php index f616975..dfd1ee6 100644 --- a/Puc/v5p0/Autoloader.php +++ b/Puc/v5p0/Autoloader.php @@ -73,7 +73,7 @@ public function autoload($className) { 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) ) {