Skip to content

Commit

Permalink
Merge pull request #33062 from nextcloud/backport/32857/stable24
Browse files Browse the repository at this point in the history
[stable24] Fix  undefined when no tags
  • Loading branch information
blizzz authored Jul 6, 2022
2 parents ef1e4f3 + 7abb4c3 commit 174560f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/Command/SystemTag/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -72,7 +72,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
* @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(),
Expand Down

0 comments on commit 174560f

Please sign in to comment.