Merge pull request #48513 from nextcloud/fix/taskprocessing-manager/php-notice

fix(TaskProcessing\Manager): Don't provoke PHP notice in setTaskResult
This commit is contained in:
Marcel Klehr 2024-10-02 09:56:13 +02:00 committed by GitHub
commit 06bfb20f2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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);
}
}