[FOLLOWUP] Class loader handles invalid classes 96/28596/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Fri, 21 Mar 2014 10:20:08 +0000 (11:20 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 21 Mar 2014 10:32:40 +0000 (11:32 +0100)
The check if we have class information
can be simplified to !empty()

Resolves: #57117
Related: #56933
Releases: 6.2
Change-Id: I8532b26142cc39da2b9bcca9880df715da57d59e
Reviewed-on: https://review.typo3.org/28596
Reviewed-by: Frans Saris
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Stefan Neufeind
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Core/ClassLoader.php

index 72c40f8..8b802b6 100644 (file)
@@ -181,7 +181,7 @@ class ClassLoader {
                //   2 and following => alias class names
                // )
                $loadingSuccessful = FALSE;
-               if (is_array($classLoadingInformation) && count($classLoadingInformation) > 0) {
+               if (!empty($classLoadingInformation)) {
                        // The call to class_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];