[BUGFIX] ClassLoader also needs to check for interfaces
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Core / ClassLoader.php
index 4d9b4cc..868835d 100644 (file)
@@ -177,9 +177,11 @@ class ClassLoader {
                // )
                $loadingSuccessful = FALSE;
                if (!empty($classLoadingInformation)) {
-                       // The call to class_exists fixes a rare case when early instances need to be aliased
+                       // The call to class_exists/interface_exists fixes a rare case when early instances need to be aliased
                        // but PHP fails to recognize the real path of the class. See #55904
-                       $loadingSuccessful = class_exists($classLoadingInformation[1], FALSE) || (bool)require_once $classLoadingInformation[0];
+                       $loadingSuccessful = class_exists($classLoadingInformation[1], FALSE)
+                               || interface_exists($classLoadingInformation[1], FALSE)
+                               || (bool)require_once $classLoadingInformation[0];
                }
                if ($loadingSuccessful && count($classLoadingInformation) > 2) {
                        $originalClassName = $classLoadingInformation[1];