diff options
Diffstat (limited to 'include')
-rwxr-xr-x | include/dba/dba_driver.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php index c829c3714..9e1804a7d 100755 --- a/include/dba/dba_driver.php +++ b/include/dba/dba_driver.php @@ -112,8 +112,11 @@ function q($sql) { if($db && $db->connected) { $stmt = vsprintf($sql,$args); - if($stmt === false) - logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true)); + if($stmt === false) { + if(version_compare(PHP_VERSION,'5.4.0') >= 0) + logger('dba: vsprintf error: ' . print_r(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT,1),true)); + else + logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true)); return $db->q($stmt); } |