Improve fix for #1811
diff --git a/system/core/URI.php b/system/core/URI.php
index 40eaaeb..72f293c 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -501,6 +501,7 @@
 		}
 
 		// Cache the array for reuse
+		isset($this->keyval[$which]) OR $this->keyval[$which] = array();
 		$this->keyval[$which][$n] = $retval;
 		return $retval;
 	}