DirectorJob: check for null

Fixes issue with merged PR on PHP 8.1

refs #2680
This commit is contained in:
Thomas Gelf 2022-12-08 13:43:25 +01:00
parent 58d28e6719
commit 400bf8c0b0
1 changed files with 4 additions and 0 deletions

View File

@ -122,6 +122,10 @@ class DirectorJob extends DbObjectWithSettings implements ExportInterface, Insta
return false;
}
if ($this->get('ts_last_attempt') === null) {
return true;
}
return (
strtotime($this->get('ts_last_attempt')) + $this->get('run_interval') * 2
) < time();