Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/4352' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ClassMapAutoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public static function realPharPath($path)
return;
}

$parts = explode('/', str_replace(array('/','\\'), '/', substr($path, 8)));
$parts = explode('/', str_replace(array('/', '\\'), '/', substr($path, 8)));
$parts = array_values(array_filter($parts, function ($p) {
return ($p !== '' && $p !== '.');
}));
Expand Down
10 changes: 5 additions & 5 deletions src/ModuleAutoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ public function autoload($class)
}
}

if (count($this->namespacedPaths) >= 1 ) {
foreach ( $this->namespacedPaths as $namespace=>$path ) {
if ( false === strpos($moduleName,$namespace) ) {
if (count($this->namespacedPaths) >= 1) {
foreach ($this->namespacedPaths as $namespace => $path) {
if (false === strpos($moduleName, $namespace)) {
continue;
}

Expand Down Expand Up @@ -359,8 +359,8 @@ public function registerPath($path, $moduleName = false)
));
}
if ($moduleName) {
if (in_array( substr($moduleName, -2 ), array('\\*','\\%') ) ) {
$this->namespacedPaths[ substr($moduleName, 0, -2 ) ] = static::normalizePath($path);
if (in_array( substr($moduleName, -2), array('\\*', '\\%'))) {
$this->namespacedPaths[substr($moduleName, 0, -2)] = static::normalizePath($path);
} else {
$this->explicitPaths[$moduleName] = static::normalizePath($path);
}
Expand Down

0 comments on commit d0835c3

Please sign in to comment.