From bd194e620b935b3f4d0d7f212025144abbdd0ef8 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 23 Sep 2008 16:24:43 +0000 Subject: Belts and braces git-svn-id: https://code.elgg.org/elgg/trunk@2105 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/cache.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engine/lib/cache.php') diff --git a/engine/lib/cache.php b/engine/lib/cache.php index 6dd3b6192..ec44ee7af 100644 --- a/engine/lib/cache.php +++ b/engine/lib/cache.php @@ -39,7 +39,13 @@ * @param string $variable * @param string $value */ - public function set_variable($variable, $value) { $this->variables[$variable] = $value; } + public function set_variable($variable, $value) + { + if (!isarray($this->variables)) + $this->variables = array(); + + $this->variables[$variable] = $value; + } /** * Get variables for this cache. -- cgit v1.2.3