]> git.mxchange.org Git - core.git/commitdiff
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 fc0b4c19d10360d62cca96ecadc6984a91b823c8..c9a80904baad799108992aeef521eaabe8279feb 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