From f651d16f2575eacd72ba38230e1316ddf136ac8c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 4 May 2013 16:30:47 +0000 Subject: [PATCH] Fixed missing array --- inc/classes/main/registry/class_BaseRegistry.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.5