Fixed bug #11599: TYPO3 dies without an error message when the mysql-module for php...
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_autoloader.php
index d5f883c..e20f431 100644 (file)
@@ -104,12 +104,15 @@ class t3lib_autoloader {
                $classPath = self::getClassPathByRegistryLookup($className);
 
                if ($classPath && file_exists($classPath)) {
-                       require $classPath;
+                       t3lib_div::requireFile($classPath);
                } else {
-                       spl_autoload($className);
+                       try {
+                               spl_autoload($className);
+                       } catch (LogicException $exception) {
+                       }
                }
 
-               if (!class_exists($className, false)) {
+               if (!class_exists($className, false) && !interface_exists($className, false)) {
                        self::logLoadingFailure($className);
                }
        }
@@ -155,8 +158,8 @@ class t3lib_autoloader {
                $extensionPrefix = array_shift($classNameParts) . '_' . array_shift($classNameParts);
                $extensionKey = t3lib_extMgm::getExtensionKeyByPrefix($extensionPrefix);
 
-               if (array_key_exists($extensionKey, self::$extensionHasAutoloadConfiguration)) {
-                       // we already tried to load the extension's autoload configuration
+               if (!$extensionKey || array_key_exists($extensionKey, self::$extensionHasAutoloadConfiguration)) {
+                       // extension key could not be determined or we already tried to load the extension's autoload configuration
                        return;
                }
                $possibleAutoloadConfigurationFileName = t3lib_extMgm::extPath($extensionKey) . 'ext_autoload.php';