Skip to content

Commit

Permalink
Merge pull request #48513 from nextcloud/fix/taskprocessing-manager/p…
Browse files Browse the repository at this point in the history
…hp-notice

fix(TaskProcessing\Manager): Don't provoke PHP notice in setTaskResult
  • Loading branch information
marcelklehr authored Oct 2, 2024
2 parents 17cb6a8 + d2df0f4 commit 06bfb20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/TaskProcessing/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 06bfb20

Please sign in to comment.