Fixed missing array
authorRoland Häder <roland@mxchange.org>
Sat, 4 May 2013 16:30:47 +0000 (16:30 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 4 May 2013 16:30:47 +0000 (16:30 +0000)
inc/classes/main/registry/class_BaseRegistry.php

index fc0b4c1..c9a8090 100644 (file)
@@ -96,6 +96,12 @@ class BaseRegistry extends BaseFrameworkSystem implements Registerable {
         * @return      void
         */
        public final function addEntry ($key, $value) {
+               // Is the array there?
+               if (!isset($this->rawEntries[$key])) {
+                       // Then intialize it here
+                       $this->rawEntries[$key] = array();
+               } // END - if
+
                // Simply add it
                array_push($this->rawEntries[$key], $value);
        }
@@ -110,7 +116,7 @@ class BaseRegistry extends BaseFrameworkSystem implements Registerable {
                $entries = $this->rawEntries;
 
                // Is $key set?
-               if (!is_null($key)) {
+               if ((!is_null($key)) && (isset($this->rawEntries[$key]))) {
                        // Then use this entry
                        $entries = $this->rawEntries[$key];
                } // END - if