fix: method call on null

pull/9296/head
Luciano Righetti 2023-09-11 12:51:09 +02:00
parent d6ad402b31
commit 51e5df1ca7
1 changed files with 3 additions and 4 deletions

View File

@ -141,14 +141,13 @@ class Correlation extends AppModel
if (Configure::read('MISP.background_jobs') && $jobId) {
$this->Job = ClassRegistry::init('Job');
$this->Job->id = $jobId;
if (!$this->Job->exists()) {
$jobId = false;
}
} else {
$jobId = false;
}
if(!$this->Job->exists()){
$jobId = false;
}
if (!empty($eventIds)) {
$eventCount = count($eventIds);
foreach ($eventIds as $j => $currentEventId) {