diff --git a/sources/database/Db-mysql.class.php b/sources/database/Db-mysql.class.php
index d15315ddff..fa2b2ba9c8 100644
--- a/sources/database/Db-mysql.class.php
+++ b/sources/database/Db-mysql.class.php
@@ -775,7 +775,13 @@ function error_backtrace($error_message, $log_message = '', $error_type = false,
foreach (debug_backtrace() as $step)
{
// Found it?
- if (strpos($step['function'], 'query') === false && !in_array(substr($step['function'], 0, 7), array('smf_db_', 'preg_re', 'db_erro', 'call_us')) && strpos($step['function'], '__') !== 0)
+ if (!method_exists($this, $step['function']))
+ {
+ $log_message .= '
Function: ' . $step['function'];
+ break;
+ }
+ // dunno if this is needed...if not feel free to remove it
+ elseif (strpos($step['function'], 'query') === false && !in_array(substr($step['function'], 0, 7), array('elk_db_', 'preg_re', 'db_erro', 'call_us')) && strpos($step['function'], '__') !== 0)
{
$log_message .= '
Function: ' . $step['function'];
break;
diff --git a/sources/database/Db-postgresql.class.php b/sources/database/Db-postgresql.class.php
index d77a0db838..236fd4aea0 100644
--- a/sources/database/Db-postgresql.class.php
+++ b/sources/database/Db-postgresql.class.php
@@ -834,7 +834,13 @@ function error_backtrace($error_message, $log_message = '', $error_type = false,
foreach (debug_backtrace() as $step)
{
// Found it?
- if (strpos($step['function'], 'query') === false && !in_array(substr($step['function'], 0, 7), array('smf_db_', 'preg_re', 'db_erro', 'call_us')) && strpos($step['function'], '__') !== 0)
+ if (!method_exists($this, $step['function']))
+ {
+ $log_message .= '
Function: ' . $step['function'];
+ break;
+ }
+ // dunno if this is needed...if not feel free to remove it
+ elseif (strpos($step['function'], 'query') === false && !in_array(substr($step['function'], 0, 7), array('elk_db_', 'preg_re', 'db_erro', 'call_us')) && strpos($step['function'], '__') !== 0)
{
$log_message .= '
Function: ' . $step['function'];
break;
diff --git a/sources/database/Db-sqlite.class.php b/sources/database/Db-sqlite.class.php
index 9f08309518..331e6d2354 100644
--- a/sources/database/Db-sqlite.class.php
+++ b/sources/database/Db-sqlite.class.php
@@ -693,7 +693,13 @@ function error_backtrace($error_message, $log_message = '', $error_type = false,
foreach (debug_backtrace() as $step)
{
// Found it?
- if (strpos($step['function'], 'query') === false && !in_array(substr($step['function'], 0, 7), array('smf_db_', 'preg_re', 'db_erro', 'call_us')) && strpos($step['function'], '__') !== 0)
+ if (!method_exists($this, $step['function']))
+ {
+ $log_message .= '
Function: ' . $step['function'];
+ break;
+ }
+ // dunno if this is needed...if not feel free to remove it
+ elseif (strpos($step['function'], 'query') === false && !in_array(substr($step['function'], 0, 7), array('elk_db_', 'preg_re', 'db_erro', 'call_us')) && strpos($step['function'], '__') !== 0)
{
$log_message .= '
Function: ' . $step['function'];
break;