Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into email
diff --git a/application/errors/error_404.php b/application/views/errors/error_404.php
similarity index 100%
rename from application/errors/error_404.php
rename to application/views/errors/error_404.php
diff --git a/application/errors/error_db.php b/application/views/errors/error_db.php
similarity index 100%
rename from application/errors/error_db.php
rename to application/views/errors/error_db.php
diff --git a/application/errors/error_general.php b/application/views/errors/error_general.php
similarity index 100%
rename from application/errors/error_general.php
rename to application/views/errors/error_general.php
diff --git a/application/errors/error_php.php b/application/views/errors/error_php.php
similarity index 100%
rename from application/errors/error_php.php
rename to application/views/errors/error_php.php
diff --git a/application/errors/index.html b/application/views/errors/index.html
similarity index 100%
rename from application/errors/index.html
rename to application/views/errors/index.html
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 585bb7b..c8245fc 100755
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -101,17 +101,6 @@
 
 /*
  * ------------------------------------------------------
- *  Set a liberal script execution time limit
- * ------------------------------------------------------
- */
-	if (function_exists('set_time_limit') && @ini_get('safe_mode') == 0
-		&& php_sapi_name() !== 'cli') // Do not override the Time Limit value if running from Command Line
-	{
-		@set_time_limit(300);
-	}
-
-/*
- * ------------------------------------------------------
  *  Start the timer... tick tock tick tock...
  * ------------------------------------------------------
  */
diff --git a/system/core/Common.php b/system/core/Common.php
index 8b89777..4b733ac 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -487,16 +487,6 @@
 	 */
 	function _exception_handler($severity, $message, $filepath, $line)
 	{
-		 // We don't bother with "strict" notices since they tend to fill up
-		 // the log file with excess information that isn't normally very helpful.
-		 // For example, if you are running PHP 5 and you use version 4 style
-		 // class functions (without prefixes like "public", "private", etc.)
-		 // you'll get notices telling you that these have been deprecated.
-		if ($severity == E_STRICT)
-		{
-			return;
-		}
-
 		$_error =& load_class('Exceptions', 'core');
 
 		// Should we display the error? We'll get the current error_reporting
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index 965a717..8c32085 100755
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -143,7 +143,7 @@
 			ob_end_flush();
 		}
 		ob_start();
-		include(APPPATH.'errors/'.$template.'.php');
+		include(APPPATH.'views/errors/'.$template.'.php');
 		$buffer = ob_get_contents();
 		ob_end_clean();
 		return $buffer;
@@ -177,7 +177,7 @@
 			ob_end_flush();
 		}
 		ob_start();
-		include(APPPATH.'errors/error_php.php');
+		include(APPPATH.'views/errors/error_php.php');
 		$buffer = ob_get_contents();
 		ob_end_clean();
 		echo $buffer;
diff --git a/system/core/Input.php b/system/core/Input.php
index e916ac6..97be9e6 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -135,7 +135,7 @@
 	{
 		if ( ! isset($array[$index]))
 		{
-			return FALSE;
+			return NULL;
 		}
 
 		if ($xss_clean === TRUE)
@@ -659,7 +659,7 @@
 
 		if ( ! isset($this->headers[$index]))
 		{
-			return FALSE;
+			return NULL;
 		}
 
 		return ($xss_clean === TRUE)
diff --git a/system/core/URI.php b/system/core/URI.php
index e66cb6d..a9432e0 100755
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -358,10 +358,10 @@
 	 * This function returns the URI segment based on the number provided.
 	 *
 	 * @param	int
-	 * @param	bool
+	 * @param	mixed
 	 * @return	string
 	 */
-	public function segment($n, $no_result = FALSE)
+	public function segment($n, $no_result = NULL)
 	{
 		return isset($this->segments[$n]) ? $this->segments[$n] : $no_result;
 	}
@@ -376,10 +376,10 @@
 	 * same result as $this->segment()
 	 *
 	 * @param	int
-	 * @param	bool
+	 * @param	mixed
 	 * @return	string
 	 */
-	public function rsegment($n, $no_result = FALSE)
+	public function rsegment($n, $no_result = NULL)
 	{
 		return isset($this->rsegments[$n]) ? $this->rsegments[$n] : $no_result;
 	}
@@ -462,7 +462,7 @@
 		{
 			return (count($default) === 0)
 				? array()
-				: array_fill_keys($default, FALSE);
+				: array_fill_keys($default, NULL);
 		}
 
 		$segments = array_slice($this->$segment_array(), ($n - 1));
@@ -477,7 +477,7 @@
 			}
 			else
 			{
-				$retval[$seg] = FALSE;
+				$retval[$seg] = NULL;
 				$lastval = $seg;
 			}
 
@@ -490,7 +490,7 @@
 			{
 				if ( ! array_key_exists($val, $retval))
 				{
-					$retval[$val] = FALSE;
+					$retval[$val] = NULL;
 				}
 			}
 		}
@@ -511,7 +511,7 @@
 	public function assoc_to_uri($array)
 	{
 		$temp = array();
-		foreach ( (array) $array as $key => $val)
+		foreach ((array) $array as $key => $val)
 		{
 			$temp[] = $key;
 			$temp[] = $val;
@@ -644,7 +644,7 @@
 	 */
 	public function ruri_string()
 	{
-		return '/'.implode('/', $this->rsegment_array());
+		return implode('/', $this->rsegment_array());
 	}
 
 }
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index b73ed51..8270503 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -245,7 +245,7 @@
 		// This becomes the unique "row ID"
 		if (isset($items['options']) && count($items['options']) > 0)
 		{
-			$rowid = md5($items['id'].implode('', $items['options']));
+			$rowid = md5($items['id'].serialize($items['options']));
 		}
 		else
 		{
diff --git a/system/libraries/Session.php b/system/libraries/Session.php
index 783109a..4d6aa0c 100644
--- a/system/libraries/Session.php
+++ b/system/libraries/Session.php
@@ -276,7 +276,7 @@
 		$session = $this->CI->input->cookie($this->sess_cookie_name);
 
 		// No cookie?  Goodbye cruel world!...
-		if ($session === FALSE)
+		if ($session === NULL)
 		{
 			log_message('debug', 'A session cookie was not found.');
 			return FALSE;
@@ -586,7 +586,7 @@
 	 */
 	public function userdata($item)
 	{
-		return isset($this->userdata[$item]) ? $this->userdata[$item] : FALSE;
+		return isset($this->userdata[$item]) ? $this->userdata[$item] : NULL;
 	}
 
 	// --------------------------------------------------------------------
@@ -715,7 +715,7 @@
 	{
 		// 'old' flashdata gets removed. Here we mark all
 		// flashdata as 'new' to preserve it from _flashdata_sweep()
-		// Note the function will return FALSE if the $key
+		// Note the function will return NULL if the $key
 		// provided cannot be found
 		$value = $this->userdata($this->flashdata_key.':old:'.$key);
 
diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php
index fd0576e..a066d99 100644
--- a/tests/codeigniter/core/Input_test.php
+++ b/tests/codeigniter/core/Input_test.php
@@ -28,11 +28,13 @@
 		$this->assertTrue( ! $this->input->get());
 		$this->assertTrue( ! $this->input->get('foo'));
 
-		$this->assertTrue($this->input->get() == FALSE);
-		$this->assertTrue($this->input->get('foo') == FALSE);
+		// Test we're getting empty results
+		$this->assertTrue($this->input->get() == NULL);
+		$this->assertTrue($this->input->get('foo') == NULL);
 
-		$this->assertTrue($this->input->get() === FALSE);
-		$this->assertTrue($this->input->get('foo') === FALSE);
+		// Test new 3.0 behaviour for non existant results (used to be FALSE)
+		$this->assertTrue($this->input->get() === NULL);
+		$this->assertTrue($this->input->get('foo') === NULL);
 	}
 
 	// --------------------------------------------------------------------
@@ -68,11 +70,11 @@
 		$this->assertTrue( ! $this->input->post());
 		$this->assertTrue( ! $this->input->post('foo'));
 
-		$this->assertTrue($this->input->post() == FALSE);
-		$this->assertTrue($this->input->post('foo') == FALSE);
+		$this->assertTrue($this->input->post() == NULL);
+		$this->assertTrue($this->input->post('foo') == NULL);
 
-		$this->assertTrue($this->input->post() === FALSE);
-		$this->assertTrue($this->input->post('foo') === FALSE);
+		$this->assertTrue($this->input->post() === NULL);
+		$this->assertTrue($this->input->post('foo') === NULL);
 	}
 
 	// --------------------------------------------------------------------
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 8c54f43..5a9bca2 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -37,6 +37,7 @@
       Only entries in ``$autoload['libraries']`` are auto-loaded now.
    -  Added some more doctypes.
    -  Updated all classes to be written in PHP 5 style, with visibility declarations and no ``var`` usage for properties.
+   -  Moved error templates to "application/views/errors"
 
 -  Helpers
 
diff --git a/user_guide_src/source/installation/upgrade_200.rst b/user_guide_src/source/installation/upgrade_200.rst
index b39f4fd..29f44bd 100644
--- a/user_guide_src/source/installation/upgrade_200.rst
+++ b/user_guide_src/source/installation/upgrade_200.rst
@@ -87,7 +87,14 @@
 convention. Please update extended libraries to call
 parent::\__construct().
 
-Step 8: Update your user guide
+Step 8: Move any core extensions to application/core
+====================================================
+
+Any extensions to core classes (e.g. MY_Controller.php) in your
+application/libraries folder must be moved to the new 
+application/core folder.
+
+Step 9: Update your user guide
 ==============================
 
 Please replace your local copy of the user guide with the new version,
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index e434e8d..63c4227 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -40,4 +40,9 @@
 
     $active_group = 'default';
     // $active_record = TRUE;
-    $query_builder = TRUE;
\ No newline at end of file
+    $query_builder = TRUE;
+    
+Step 5: Move your errors folder
+===============================
+
+In version 3.0.0, the errors folder has been moved from "application/errors" to "application/views/errors".
\ No newline at end of file
diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst
index 1f2ea65..432bac3 100644
--- a/user_guide_src/source/libraries/input.rst
+++ b/user_guide_src/source/libraries/input.rst
@@ -18,7 +18,7 @@
 :doc:`controller <../general/controllers>` is invoked. It does the
 following:
 
--  If $config['allow_get_array'] is FALSE(default is TRUE), destroys
+-  If $config['allow_get_array'] is FALSE (default is TRUE), destroys
    the global GET array.
 -  Destroys all global variables in the event register_globals is
    turned on.
@@ -53,14 +53,7 @@
 having to test whether an item exists first. In other words, normally
 you might do something like this::
 
-	if ( ! isset($_POST['something']))
-	{
-	    $something = FALSE;
-	}
-	else
-	{
-	    $something = $_POST['something'];
-	}
+	$something = isset($_POST['something']) ? $_POST['something'] : NULL;
 
 With CodeIgniter's built in functions you can simply do this::
 
@@ -95,7 +88,7 @@
 To return all POST items and pass them through the XSS filter set the
 first parameter NULL while setting the second parameter to boolean;
 
-The function returns FALSE (boolean) if there are no items in the POST.
+The function returns NULL if there are no items in the POST.
 
 ::
 
@@ -115,7 +108,7 @@
 To return all GET items and pass them through the XSS filter set the
 first parameter NULL while setting the second parameter to boolean;
 
-The function returns FALSE (boolean) if there are no items in the GET.
+The function returns NULL if there are no items in the GET.
 
 ::
 
@@ -210,7 +203,7 @@
 
 	cookie('some_cookie');
 
-The function returns FALSE (boolean) if the item you are attempting to
+The function returns NULL if the item you are attempting to
 retrieve does not exist.
 
 The second optional parameter lets you run the data through the XSS
diff --git a/user_guide_src/source/libraries/uri.rst b/user_guide_src/source/libraries/uri.rst
index ee60b77..cdd76e3 100644
--- a/user_guide_src/source/libraries/uri.rst
+++ b/user_guide_src/source/libraries/uri.rst
@@ -25,7 +25,7 @@
 #. metro
 #. crime_is_up
 
-By default the function returns FALSE (boolean) if the segment does not
+By default the function returns NULL if the segment does not
 exist. There is an optional second parameter that permits you to set
 your own default value if the segment is missing. For example, this
 would tell the function to return the number zero in the event of