mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Don't break the webui when there are broken sql queries. (#8436)
This commit is contained in:
committed by
Neil Lathwood
parent
607a7f801d
commit
f950bb63e5
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user