mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix alert log clearing SQL query (#14200)
only replace one, lock_and_purge_query() already takes care of second...
This commit is contained in:
@@ -287,7 +287,7 @@ if ($options['f'] === 'alert_log') {
|
||||
if (! (is_numeric($purge_duration) && $purge_duration > 0)) {
|
||||
return -2;
|
||||
}
|
||||
$sql = str_replace('?', strval($purge_duration), $sql);
|
||||
$sql = preg_replace('/\?/', strval($purge_duration), $sql, 1);
|
||||
lock_and_purge_query($table, $sql, $msg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user