remove php version checks for older ( < 5.4) code incompatibilities

This commit is contained in:
zotlabs
2017-05-23 21:20:40 -07:00
parent bf580fcc06
commit 3a00140797
3 changed files with 15 additions and 30 deletions

View File

@@ -344,11 +344,8 @@ function q($sql) {
if(\DBA::$dba && \DBA::$dba->connected) {
$stmt = vsprintf($sql, $args);
if($stmt === false) {
if(version_compare(PHP_VERSION, '5.4.0') >= 0)
db_logger('dba: vsprintf error: ' .
print_r(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 1), true),LOGGER_NORMAL,LOG_CRIT);
else
db_logger('dba: vsprintf error: ' . print_r(debug_backtrace(), true),LOGGER_NORMAL,LOG_CRIT);
db_logger('dba: vsprintf error: ' .
print_r(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 1), true),LOGGER_NORMAL,LOG_CRIT);
}
if(\DBA::$dba->debug)
db_logger('Sql: ' . $stmt, LOGGER_DEBUG, LOG_INFO);