Browse Source

Fix undefined when no tags

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
tags/v25.0.0beta1
Daniel Kesselberg 2 years ago
parent
commit
fb8d54ef72
No account linked to committer's email address
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      core/Command/SystemTag/ListCommand.php

+ 4
- 2
core/Command/SystemTag/ListCommand.php View 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;
@@ -70,7 +70,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(),

Loading…
Cancel
Save