From d2df0f42f163cba6c7a9ffc203ca124f65b9d783 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Wed, 2 Oct 2024 08:38:20 +0200 Subject: [PATCH] fix(TaskProcessing\Manager): Don't provoke PHP notice in setTaskResult Signed-off-by: Marcel Klehr --- lib/private/TaskProcessing/Manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php index 36089f50f7f42..4e9668021ad3f 100644 --- a/lib/private/TaskProcessing/Manager.php +++ b/lib/private/TaskProcessing/Manager.php @@ -921,7 +921,7 @@ public function setTaskResult(int $id, ?string $error, ?array $result, bool $isU if ($value instanceof Node) { $output[$key] = $value->getId(); } - if (is_array($value) && $value[0] instanceof Node) { + if (is_array($value) && isset($value[0]) && $value[0] instanceof Node) { $output[$key] = array_map(fn ($node) => $node->getId(), $value); } }