From: Roland Häder Date: Sat, 4 May 2013 16:30:47 +0000 (+0000) Subject: Fixed missing array X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f651d16f2575eacd72ba38230e1316ddf136ac8c;p=core.git Fixed missing array --- diff --git a/inc/classes/main/registry/class_BaseRegistry.php b/inc/classes/main/registry/class_BaseRegistry.php index fc0b4c19..c9a80904 100644 --- a/inc/classes/main/registry/class_BaseRegistry.php +++ b/inc/classes/main/registry/class_BaseRegistry.php @@ -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