Fix workerqueue entries with wrong priority

This commit is contained in:
Michael 2022-05-14 06:36:43 +00:00
parent 30bcb24af7
commit a8839517fe
2 changed files with 3 additions and 3 deletions

View file

@ -1322,7 +1322,7 @@ class Worker
$found = DBA::exists('workerqueue', ['command' => $command, 'parameter' => $parameters, 'done' => false]);
$added = 0;
if (!in_array($priority, PRIORITIES)) {
if (!is_int($priority) || !in_array($priority, PRIORITIES)) {
Logger::warning('Invalid priority', ['priority' => $priority, 'command' => $command, 'callstack' => System::callstack(20)]);
$priority = PRIORITY_MEDIUM;
}