From ab3cab5a8f2afdd45ec8c6c365e43722781e54e6 Mon Sep 17 00:00:00 2001 From: dixy Date: Sat, 21 Apr 2012 00:58:00 +0200 Subject: Use parameter 'get_as_float' of microtime() --- system/core/Benchmark.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'system/core') diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index f6b634deb..39027e809 100755 --- a/system/core/Benchmark.php +++ b/system/core/Benchmark.php @@ -61,7 +61,7 @@ class CI_Benchmark { */ public function mark($name) { - $this->marker[$name] = microtime(); + $this->marker[$name] = microtime(TRUE); } // -------------------------------------------------------------------- @@ -93,13 +93,10 @@ class CI_Benchmark { if ( ! isset($this->marker[$point2])) { - $this->marker[$point2] = microtime(); + $this->marker[$point2] = microtime(TRUE); } - list($sm, $ss) = explode(' ', $this->marker[$point1]); - list($em, $es) = explode(' ', $this->marker[$point2]); - - return number_format(($em + $es) - ($sm + $ss), $decimals); + return number_format($this->marker[$point2] - $this->marker[$point1], $decimals); } // -------------------------------------------------------------------- @@ -122,4 +119,4 @@ class CI_Benchmark { } /* End of file Benchmark.php */ -/* Location: ./system/core/Benchmark.php */ +/* Location: ./system/core/Benchmark.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From b3f774bbbb81293326136e3e13297c3b8d49dfa4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 23 Apr 2012 12:57:57 +0300 Subject: Fix issue #1265 --- system/core/CodeIgniter.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'system/core') diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 4885f310c..92187fa16 100755 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -275,12 +275,12 @@ { $x = explode('/', $RTR->routes['404_override'], 2); $class = $x[0]; - $method = (isset($x[1]) ? $x[1] : 'index'); + $method = isset($x[1]) ? $x[1] : 'index'; if ( ! class_exists($class)) { if ( ! file_exists(APPPATH.'controllers/'.$class.'.php')) { - show_404("{$class}/{$method}"); + show_404($class.'/'.$method); } include_once(APPPATH.'controllers/'.$class.'.php'); @@ -288,7 +288,7 @@ } else { - show_404("{$class}/{$method}"); + show_404($class.'/'.$method); } } @@ -337,12 +337,12 @@ { $x = explode('/', $RTR->routes['404_override'], 2); $class = $x[0]; - $method = (isset($x[1]) ? $x[1] : 'index'); + $method = isset($x[1]) ? $x[1] : 'index'; if ( ! class_exists($class)) { if ( ! file_exists(APPPATH.'controllers/'.$class.'.php')) { - show_404("{$class}/{$method}"); + show_404($class.'/'.$method); } include_once(APPPATH.'controllers/'.$class.'.php'); @@ -352,7 +352,7 @@ } else { - show_404("{$class}/{$method}"); + show_404($class.'/'.$method); } } @@ -393,10 +393,10 @@ * Close the DB connection if one exists * ------------------------------------------------------ */ - if (class_exists('CI_DB') && isset($CI->db)) + if (class_exists('CI_DB') && isset($CI->db) && ! $CI->db->pconnect) { $CI->db->close(); } /* End of file CodeIgniter.php */ -/* Location: ./system/core/CodeIgniter.php */ +/* Location: ./system/core/CodeIgniter.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b