Merge pull request #3027 from abdmaster/fix/db_transaction_failure

Added `_trans_failure` property to fix PHP Warning.
diff --git a/system/core/URI.php b/system/core/URI.php
index 9a545fd..2361ecf 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -56,12 +56,14 @@
 	/**
 	 * List of URI segments
 	 *
+	 * Starts at 1 instead of 0.
+	 *
 	 * @var	array
 	 */
 	public $segments = array();
 
 	/**
-	 * Re-indexed list of URI segments
+	 * List of routed URI segments
 	 *
 	 * Starts at 1 instead of 0.
 	 *
@@ -158,7 +160,7 @@
 
 			$this->segments[0] = NULL;
 			// Populate the segments array
-			foreach (explode('/', preg_replace('|/*(.+?)/*$|', '\\1', $this->uri_string)) as $val)
+			foreach (explode('/', trim($this->uri->string, '/')) as $val)
 			{
 				// Filter segments for security
 				$val = trim($this->filter_uri($val));