-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
6,979 additions
and
4,155 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,8 +37,8 @@ | |
* | ||
* @author Fabien Potencier <[email protected]> | ||
* @author Jordi Boggiano <[email protected]> | ||
* @see http://www.php-fig.org/psr/psr-0/ | ||
* @see http://www.php-fig.org/psr/psr-4/ | ||
* @see https://www.php-fig.org/psr/psr-0/ | ||
* @see https://www.php-fig.org/psr/psr-4/ | ||
*/ | ||
class ClassLoader | ||
{ | ||
|
@@ -60,7 +60,7 @@ class ClassLoader | |
public function getPrefixes() | ||
{ | ||
if (!empty($this->prefixesPsr0)) { | ||
return call_user_func_array('array_merge', $this->prefixesPsr0); | ||
return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); | ||
} | ||
|
||
return array(); | ||
|
@@ -279,7 +279,7 @@ public function isClassMapAuthoritative() | |
*/ | ||
public function setApcuPrefix($apcuPrefix) | ||
{ | ||
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; | ||
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; | ||
} | ||
|
||
/** | ||
|
@@ -377,7 +377,7 @@ private function findFileWithExtension($class, $ext) | |
$subPath = $class; | ||
while (false !== $lastPos = strrpos($subPath, '\\')) { | ||
$subPath = substr($subPath, 0, $lastPos); | ||
$search = $subPath.'\\'; | ||
$search = $subPath . '\\'; | ||
if (isset($this->prefixDirsPsr4[$search])) { | ||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); | ||
foreach ($this->prefixDirsPsr4[$search] as $dir) { | ||
|
Oops, something went wrong.