From 70a8626a4d9ddbf9467970acf1b329b1d484791f Mon Sep 17 00:00:00 2001 From: Richard Cunningham Date: Wed, 19 Mar 2014 13:11:14 -0400 Subject: Fix profiling of benchmarked names like 'something_endpoint_end' --- system/libraries/Profiler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 810a025a4..197dab7d9 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -153,7 +153,7 @@ class CI_Profiler { { // We match the "end" marker so that the list ends // up in the order that it was defined - if (preg_match('/(.+?)_end/i', $key, $match) + if (preg_match('/(.+?)_end$/i', $key, $match) && isset($this->CI->benchmark->marker[$match[1].'_end'], $this->CI->benchmark->marker[$match[1].'_start'])) { $profile[$match[1]] = $this->CI->benchmark->elapsed_time($match[1].'_start', $key); -- cgit v1.2.3-24-g4f1b