diff options
author | friendica <info@friendica.com> | 2014-09-09 01:23:52 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-09-09 01:23:52 -0700 |
commit | 9753453ec4ed56fe8d1d07910147929d2e1a05c2 (patch) | |
tree | 0538a63ca2c6da1c1f4377735335a50016427c09 | |
parent | 4384fa8b12331b369b313efb938a23b8bde34e61 (diff) | |
download | volse-hubzilla-9753453ec4ed56fe8d1d07910147929d2e1a05c2.tar.gz volse-hubzilla-9753453ec4ed56fe8d1d07910147929d2e1a05c2.tar.bz2 volse-hubzilla-9753453ec4ed56fe8d1d07910147929d2e1a05c2.zip |
if we have php54 don't log the whole damn stack on a db error, just the current frame
-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); } |