if we have php54 don't log the whole damn stack on a db error, just the current frame
This commit is contained in:
parent
4384fa8b12
commit
9753453ec4
@ -112,8 +112,11 @@ function q($sql) {
|
|||||||
|
|
||||||
if($db && $db->connected) {
|
if($db && $db->connected) {
|
||||||
$stmt = vsprintf($sql,$args);
|
$stmt = vsprintf($sql,$args);
|
||||||
if($stmt === false)
|
if($stmt === false) {
|
||||||
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true));
|
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);
|
return $db->q($stmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user