Skip to content

Commit 747a326

Browse files
committed
Check for "Loader" in $call['class'] instead of $call['file']
1 parent 4455810 commit 747a326

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/database/DB_driver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ public function display_error($error = '', $swap = '', $native = FALSE)
13531353
$trace = debug_backtrace();
13541354
foreach ($trace as $call)
13551355
{
1356-
if (isset($call['file']) && strpos($call['file'], BASEPATH.'database') === FALSE && preg_match('#core/(MY_)?Loader#', $call['file']) === 0 )
1356+
if (isset($call['file']) && strpos($call['file'], BASEPATH.'database') === FALSE && isset($call['class']) && strpos($call['class'], 'Loader') !== FALSE)
13571357
{
13581358
// Found it - use a relative path for safety
13591359
$message[] = 'Filename: '.str_replace(array(APPPATH, BASEPATH), '', $call['file']);

0 commit comments

Comments
 (0)