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

Commit

Permalink
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/AutoloaderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,12 @@ public static function factory($options = null)
);
}

// 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.7', '>=')) {
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)
);
}
require_once __DIR__ . '/../Stdlib/SubClass.php';
if (!\Zend\Stdlib\SubClass::isSubclassOf($class, 'Zend\Loader\SplAutoloader')) {
require_once 'Exception/InvalidArgumentException.php';
throw new Exception\InvalidArgumentException(
sprintf('Autoloader class %s must implement Zend\\Loader\\SplAutoloader', $class)
);
}

if ($class === static::STANDARD_AUTOLOADER) {
Expand Down

0 comments on commit 13e8cbe

Please sign in to comment.