From: Alexander Ebert Date: Thu, 26 Sep 2013 18:19:48 +0000 (+0200) Subject: Removed unnecessary array_key_exists() call X-Git-Tag: 2.0.0_Beta_10~6^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d61906714c3f937aba1be4479d6e32d26480b4fe;p=GitHub%2FWoltLab%2FWCF.git Removed unnecessary array_key_exists() call --- diff --git a/wcfsetup/install/files/lib/system/SingletonFactory.class.php b/wcfsetup/install/files/lib/system/SingletonFactory.class.php index dea129cff3..0dfbf83241 100644 --- a/wcfsetup/install/files/lib/system/SingletonFactory.class.php +++ b/wcfsetup/install/files/lib/system/SingletonFactory.class.php @@ -55,7 +55,7 @@ abstract class SingletonFactory { self::$__singletonObjects[$className] = null; self::$__singletonObjects[$className] = new $className(); } - else if (array_key_exists($className, self::$__singletonObjects) && self::$__singletonObjects[$className] === null) { + else if (self::$__singletonObjects[$className] === null) { throw new SystemException("Infinite loop detected while trying to retrieve object for '".$className."'"); }