Don't break the webui when there are broken sql queries. (#8436)

This commit is contained in:
Tony Murray
2018-03-21 12:36:17 -05:00
committed by Neil Lathwood
parent 607a7f801d
commit f950bb63e5

View File

@@ -118,7 +118,7 @@ function dbQuery($sql, $parameters = array())
if (isset($config['mysql_log_level']) && ((in_array($config['mysql_log_level'], array('INFO', 'ERROR')) && !preg_match('/Duplicate entry/', $mysql_error)) || in_array($config['mysql_log_level'], array('DEBUG')))) {
if (!empty($mysql_error)) {
$error_msg = "MySQL Error: $mysql_error ($fullSql)";
c_echo("%R$error_msg%n\n");
c_echo("%R$error_msg%n\n", isCli() || $debug);
logfile(date($config['dateformat']['compact']) . ' ' . $error_msg);
}
}