Skip to content

Commit

Permalink
Merge branch 'autoload' of https://github.com/legoktm/PHP_CodeSniffer
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Jul 13, 2017
2 parents 2e50830 + 2039c8a commit 576e94d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion autoload.php
Expand Up @@ -67,6 +67,12 @@ public static function load($class)
// so this autoloader runs before the composer one as we need to include
// all files so we can figure out what the class/interface/trait name is.
if (self::$composerAutoloader === null) {
// Make sure we don't try to load any of Composer's classes
// while the autoloader is being setup.
if (strpos($class, 'Composer\\') === 0) {
return;
}

if (strpos(__DIR__, 'phar://') !== 0
&& file_exists(__DIR__.'/../../autoload.php') === true
) {
Expand All @@ -82,7 +88,7 @@ public static function load($class)
} else {
self::$composerAutoloader = false;
}
}
}//end if

$ds = DIRECTORY_SEPARATOR;
$path = false;
Expand Down

0 comments on commit 576e94d

Please sign in to comment.