diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-07-06 15:22:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-06 15:22:48 +0300 |
commit | 174560f0f8945c4d61a1d7d8e4635045698010b1 (patch) | |
tree | 8158cff96ff87036d5d7d66fde045f9dd2a9e407 | |
parent | ef1e4f349d0ba76658425cb18c3d77e724559659 (diff) | |
parent | 7abb4c30441a2d22916a99138ff7c6eab207f34e (diff) |
Merge pull request #33062 from nextcloud/backport/32857/stable24
[stable24] Fix undefined when no tags
-rw-r--r-- | core/Command/SystemTag/ListCommand.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/Command/SystemTag/ListCommand.php b/core/Command/SystemTag/ListCommand.php index f9d17efd513..2dc68a05670 100644 --- a/core/Command/SystemTag/ListCommand.php +++ b/core/Command/SystemTag/ListCommand.php @@ -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(), |