Skip to content

Commit

Permalink
Fix inconsistent directory separators in the autoloader.
Browse files Browse the repository at this point in the history
It looks like this was the cause of a version 5.0 bug reported in #378.
  • Loading branch information
YahnisElsts committed Oct 28, 2022
1 parent 32f0079 commit 81be284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Puc/v5p0/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) ) {
Expand Down

0 comments on commit 81be284

Please sign in to comment.