Browse Source

Fix undefined when no tags

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/32857/head
Daniel Kesselberg 4 years ago
parent
commit
fb8d54ef72
No known key found for this signature in database GPG Key ID: 36E3664E099D0614
  1. 6
      core/Command/SystemTag/ListCommand.php

6
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;
@ -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