Skip to content

Commit

Permalink
Fixed PHP strict standards error (bug PHPCSStandards#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed May 5, 2015
1 parent e5cc0ab commit f730ea9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ public static function loadFile($path)

include $path;

$className = array_pop(array_diff(get_declared_classes(), $classes));
$newClasses = array_diff(get_declared_classes(), $classes);
$className = array_pop($newClasses);
if ($className === null) {
$className = array_pop(array_diff(get_declared_interfaces(), $interfaces));
$newClasses = array_diff(get_declared_interfaces(), $classes);
$className = array_pop($newClasses);
}

self::$loadedClasses[$path] = $className;
Expand Down

0 comments on commit f730ea9

Please sign in to comment.