diff --git a/lib/Listener/TaskProcessingListener.php b/lib/Listener/TaskProcessingListener.php index fa55217378..dc93b180ff 100644 --- a/lib/Listener/TaskProcessingListener.php +++ b/lib/Listener/TaskProcessingListener.php @@ -60,8 +60,14 @@ public function handle(Event $event): void { $this->logger->info('Error handling task processing event user id missing'); return; } - if ($task->getOutput() !== null && isset($task->getOutput()['output'])) { - $summary = (string)$task->getOutput()['output']; + if ($task->getOutput() !== null) { + $output = $task->getOutput(); + if (isset($task->getOutput()['output'])) { + $summary = (string)$output['output']; + } else { + $this->logger->info('Error handling task processing event output is invalid'); + return; + } } else { $this->logger->info('Error handling task processing event output missing'); return;