]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix undefined when no tags 33062/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Mon, 13 Jun 2022 09:37:48 +0000 (11:37 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Wed, 29 Jun 2022 13:15:59 +0000 (13:15 +0000)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
core/Command/SystemTag/ListCommand.php

index f9d17efd513609cf902cfe10d0ae9499484ce5e4..2dc68a0567024360db6e0b4891815ba36d99e621 100644 (file)
@@ -23,8 +23,8 @@
 namespace OC\Core\Command\SystemTag;
 
 use OC\Core\Command\Base;
-use OCP\SystemTag\ISystemTagManager;
 use OCP\SystemTag\ISystemTag;
+use OCP\SystemTag\ISystemTagManager;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
@@ -72,7 +72,9 @@ class ListCommand extends Base {
         * @param ISystemtag[] $tags
         * @return array
         */
-       private function formatTags(array $tags) {
+       private function formatTags(array $tags): array {
+               $result = [];
+
                foreach ($tags as $tag) {
                        $result[$tag->getId()] = [
                                'name' => $tag->getName(),