From 274e7eea04b3ed49cb0759fcbb71651bceeb02bd Mon Sep 17 00:00:00 2001 From: Helmut Hummel <helmut.hummel@typo3.org> Date: Fri, 21 Mar 2014 11:20:08 +0100 Subject: [PATCH] [FOLLOWUP] Class loader handles invalid classes 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/core/Classes/Core/ClassLoader.php b/typo3/sysext/core/Classes/Core/ClassLoader.php index 72c40f80d3aa..8b802b6aa5d8 100644 --- a/typo3/sysext/core/Classes/Core/ClassLoader.php +++ b/typo3/sysext/core/Classes/Core/ClassLoader.php @@ -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]; -- GitLab