From: Roland Häder Date: Sat, 25 Feb 2023 09:45:25 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d80aa06027f7eafcabc7c5e307d2126456a6dc0a;p=core.git Continued: - fixed E_NOTICE --- diff --git a/framework/main/classes/registry/generic/class_GenericRegistry.php b/framework/main/classes/registry/generic/class_GenericRegistry.php index 5c2b3a01..a95f38ce 100644 --- a/framework/main/classes/registry/generic/class_GenericRegistry.php +++ b/framework/main/classes/registry/generic/class_GenericRegistry.php @@ -58,8 +58,8 @@ class GenericRegistry extends BaseRegistry implements Register { } // Is an instance there? - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('OBJECT-REGISTRY: self::registryInstance[%s][]=%s', $key, gettype(self::$registryInstances[$key]))); - if (is_null(self::$registryInstances[$key])) { + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('OBJECT-REGISTRY: self::registryInstance[%s]?=%d', $key, intval(isset((self::$registryInstances[$key]))))); + if (!isset(self::$registryInstances[$key])) { // Not yet, so create one self::$registryInstances[$key] = new ObjectRegistry(); } diff --git a/framework/main/classes/registry/object/class_ObjectRegistry.php b/framework/main/classes/registry/object/class_ObjectRegistry.php index b3c810c9..13b55b8d 100644 --- a/framework/main/classes/registry/object/class_ObjectRegistry.php +++ b/framework/main/classes/registry/object/class_ObjectRegistry.php @@ -74,8 +74,8 @@ class ObjectRegistry extends BaseRegistry implements ObjectRegister { } // Is an instance there? - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('OBJECT-REGISTRY: self::registryInstance[%s][]=%s', $key, gettype(self::$registryInstances[$key]))); - if (is_null(self::$registryInstances[$key])) { + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage(sprintf('OBJECT-REGISTRY: self::registryInstance[%s]?=%d', $key, intval(isset(self::$registryInstances[$key])))); + if (!isset(self::$registryInstances[$key])) { // Not yet, so create one self::$registryInstances[$key] = new ObjectRegistry(); }