From 747a326c22c335a4c55df77762164b2b9626f919 Mon Sep 17 00:00:00 2001 From: Jonathan Bonnefoy Date: Wed, 5 Sep 2012 18:17:21 +0200 Subject: Check for "Loader" in $call['class'] instead of $call['file'] --- system/database/DB_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 76f9433d2..9628e9a9e 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1353,7 +1353,7 @@ abstract class CI_DB_driver { $trace = debug_backtrace(); foreach ($trace as $call) { - if (isset($call['file']) && strpos($call['file'], BASEPATH.'database') === FALSE && preg_match('#core/(MY_)?Loader#', $call['file']) === 0 ) + if (isset($call['file']) && strpos($call['file'], BASEPATH.'database') === FALSE && isset($call['class']) && strpos($call['class'], 'Loader') !== FALSE) { // Found it - use a relative path for safety $message[] = 'Filename: '.str_replace(array(APPPATH, BASEPATH), '', $call['file']); -- cgit v1.2.3-24-g4f1b