From a4668f7f17bff0f2f67e76bb3e6dcab3409bfc86 Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Fri, 7 Feb 2020 09:44:07 +0100
Subject: [PATCH] [BUGFIX] Reset variables in SiteListCommand

Reset the variables holding information about locale and status to avoid
showing wrong output.

Resolves: #90334
Releases: master, 9.5
Change-Id: I20cb5847382be28b0aaaf0a8c8afec626cd99c9d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63180
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
---
 typo3/sysext/core/Classes/Command/SiteListCommand.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/typo3/sysext/core/Classes/Command/SiteListCommand.php b/typo3/sysext/core/Classes/Command/SiteListCommand.php
index 6b2205be9bbf..c0a51d4156e0 100644
--- a/typo3/sysext/core/Classes/Command/SiteListCommand.php
+++ b/typo3/sysext/core/Classes/Command/SiteListCommand.php
@@ -43,8 +43,6 @@ class SiteListCommand extends Command
      */
     protected function execute(InputInterface $input, OutputInterface $output)
     {
-        $locales = [];
-        $status = [];
         $io = new SymfonyStyle($input, $output);
         $siteFinder = new SiteFinder();
         $sites = $siteFinder->getAllSites();
@@ -68,6 +66,8 @@ class SiteListCommand extends Command
         foreach ($sites as $site) {
             $baseUrls = [];
             $languages = [];
+            $locales = [];
+            $status = [];
             foreach ($site->getLanguages() as $language) {
                 $baseUrls[] = (string)$language->getBase();
                 $languages[] = sprintf(
-- 
GitLab