mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Fix undefined when no tags
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
221826c0b0
commit
7abb4c3044
1 changed files with 4 additions and 2 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue