Skip to content

Commit

Permalink
updated the autoloader factory to only check the subclass of with ver…
Browse files Browse the repository at this point in the history
…sions 5.3.7 and greater
  • Loading branch information
Mike Willbanks committed Feb 24, 2012
1 parent db7c601 commit 9f5126a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion AutoloaderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ public static function factory($options = null)
);
}

if (!is_subclass_of($class, 'Zend\Loader\SplAutoloader')) {
// unfortunately is_subclass_of is broken on some 5.3 versions
// additionally instanceof is also broken for this use case
if (version_compare(PHP_VERSION, '5.3.6', '>')) {
if (!is_subclass_of($class, 'Zend\Loader\SplAutoloader')) {
require_once 'Exception/InvalidArgumentException.php';
throw new Exception\InvalidArgumentException(
sprintf('Autoloader class %s must implement Zend\\Loader\\SplAutoloader', $class)
Expand Down

0 comments on commit 9f5126a

Please sign in to comment.