]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 25 Feb 2023 09:45:25 +0000 (10:45 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 25 Feb 2023 09:46:47 +0000 (10:46 +0100)
- fixed E_NOTICE

framework/main/classes/registry/generic/class_GenericRegistry.php
framework/main/classes/registry/object/class_ObjectRegistry.php

index 5c2b3a010c5b87180c1ed3ffaac369923b869c5d..a95f38ced18d1056355c82d71552e66147334845 100644 (file)
@@ -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();
                }
index b3c810c947b30352835f54219040f69ace45c230..13b55b8d336c2f96bff748ebe411bffcc1d97be8 100644 (file)
@@ -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();
                }