Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix #1996

  • Loading branch information...
commit 342bb7ed0396911a0c1296ce47144c6fa276b3d4 1 parent 3a5efc2
@narfbg narfbg authored
Showing with 13 additions and 10 deletions.
  1. +13 −10 system/database/DB_driver.php
View
23 system/database/DB_driver.php
@@ -1605,18 +1605,21 @@ public function display_error($error = '', $swap = '', $native = FALSE)
$trace = debug_backtrace();
foreach ($trace as $call)
{
- // We'll need this on Windows, as APPPATH and BASEPATH will always use forward slashes
- if (DIRECTORY_SEPARATOR !== '/')
+ if (isset($call['file'], $call['class']))
{
- $call['file'] = str_replace('\\', '/', $call['file']);
- }
+ // We'll need this on Windows, as APPPATH and BASEPATH will always use forward slashes
+ if (DIRECTORY_SEPARATOR !== '/')
+ {
+ $call['file'] = str_replace('\\', '/', $call['file']);
+ }
- if (isset($call['file'], $call['class']) && strpos($call['file'], BASEPATH.'database') === FALSE && strpos($call['class'], 'Loader') !== FALSE)
- {
- // Found it - use a relative path for safety
- $message[] = 'Filename: '.str_replace(array(APPPATH, BASEPATH), '', $call['file']);
- $message[] = 'Line Number: '.$call['line'];
- break;
+ if (strpos($call['file'], BASEPATH.'database') === FALSE && strpos($call['class'], 'Loader') === FALSE)
+ {
+ // Found it - use a relative path for safety
+ $message[] = 'Filename: '.str_replace(array(APPPATH, BASEPATH), '', $call['file']);
+ $message[] = 'Line Number: '.$call['line'];
+ break;
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.