]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(TaskProcessing\Manager): Don't provoke PHP notice in setTaskResult fix/taskprocessing-manager/php-notice 48513/head
authorMarcel Klehr <mklehr@gmx.net>
Wed, 2 Oct 2024 06:38:20 +0000 (08:38 +0200)
committerMarcel Klehr <mklehr@gmx.net>
Wed, 2 Oct 2024 06:38:20 +0000 (08:38 +0200)
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
lib/private/TaskProcessing/Manager.php

index 36089f50f7f429900d8563689f853027aa9909b6..4e9668021ad3fbf026d9c136063fa490cde18b5f 100644 (file)
@@ -921,7 +921,7 @@ class Manager implements IManager {
                                        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);
                                        }
                                }