Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix #1996

  • Loading branch information...
commit 342bb7ed0396911a0c1296ce47144c6fa276b3d4 1 parent 3a5efc2
Andrey Andreev narfbg authored

Showing 1 changed file with 13 additions and 10 deletions. Show diff stats Hide diff stats

  1. +13 10 system/database/DB_driver.php
23 system/database/DB_driver.php
@@ -1605,18 +1605,21 @@ public function display_error($error = '', $swap = '', $native = FALSE)
1605 1605 $trace = debug_backtrace();
1606 1606 foreach ($trace as $call)
1607 1607 {
1608   - // We'll need this on Windows, as APPPATH and BASEPATH will always use forward slashes
1609   - if (DIRECTORY_SEPARATOR !== '/')
  1608 + if (isset($call['file'], $call['class']))
1610 1609 {
1611   - $call['file'] = str_replace('\\', '/', $call['file']);
1612   - }
  1610 + // We'll need this on Windows, as APPPATH and BASEPATH will always use forward slashes
  1611 + if (DIRECTORY_SEPARATOR !== '/')
  1612 + {
  1613 + $call['file'] = str_replace('\\', '/', $call['file']);
  1614 + }
1613 1615
1614   - if (isset($call['file'], $call['class']) && strpos($call['file'], BASEPATH.'database') === FALSE && strpos($call['class'], 'Loader') !== FALSE)
1615   - {
1616   - // Found it - use a relative path for safety
1617   - $message[] = 'Filename: '.str_replace(array(APPPATH, BASEPATH), '', $call['file']);
1618   - $message[] = 'Line Number: '.$call['line'];
1619   - break;
  1616 + if (strpos($call['file'], BASEPATH.'database') === FALSE && strpos($call['class'], 'Loader') === FALSE)
  1617 + {
  1618 + // Found it - use a relative path for safety
  1619 + $message[] = 'Filename: '.str_replace(array(APPPATH, BASEPATH), '', $call['file']);
  1620 + $message[] = 'Line Number: '.$call['line'];
  1621 + break;
  1622 + }
1620 1623 }
1621 1624 }
1622 1625

0 comments on commit 342bb7e

Please sign in to comment.
Something went wrong with that request. Please try again.