From d6748dbf92d275f16eb451637780bee4a9815da6 Mon Sep 17 00:00:00 2001
From: Sascha Egerer <s.egerer@syzygy.de>
Date: Thu, 9 Feb 2017 12:35:03 +0100
Subject: [PATCH] [BUGFIX] Do not use array assignment for string variable

In PHP 7.1 it is not possible anymore to assign a value to
a variable of type string with `[]` appended. In older PHP
versions the variables was silently converted to an array but
in PHP 7.1 a warning is thrown.
Beside that the variable must be of type string anyway and not
an array.

Resolves: #79709
Releases: master
Change-Id: Ie36dcf89cff23e7837d1f559cd05b3f9f448360e
Reviewed-on: https://review.typo3.org/51608
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Johannes Kasberger <johannes.kasberger@reelworx.at>
Tested-by: Johannes Kasberger <johannes.kasberger@reelworx.at>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
---
 .../Classes/Updates/CommandLineBackendUserRemovalUpdate.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/typo3/sysext/install/Classes/Updates/CommandLineBackendUserRemovalUpdate.php b/typo3/sysext/install/Classes/Updates/CommandLineBackendUserRemovalUpdate.php
index 540d03acb35f..9492922caa3a 100644
--- a/typo3/sysext/install/Classes/Updates/CommandLineBackendUserRemovalUpdate.php
+++ b/typo3/sysext/install/Classes/Updates/CommandLineBackendUserRemovalUpdate.php
@@ -63,10 +63,10 @@ class CommandLineBackendUserRemovalUpdate extends AbstractUpdate
      * Performs the database update to set all be_users starting with _CLI_* to deleted
      *
      * @param array &$databaseQueries Queries done in this update
-     * @param mixed &$customMessages Custom messages
+     * @param string &$customMessage Custom message
      * @return bool
      */
-    public function performUpdate(array &$databaseQueries, &$customMessages)
+    public function performUpdate(array &$databaseQueries, &$customMessage)
     {
         $usersFound = $this->getUnneededCommandLineUsers();
         foreach ($usersFound as $userUid => $username) {
@@ -84,7 +84,7 @@ class CommandLineBackendUserRemovalUpdate extends AbstractUpdate
                 ->execute();
             $databaseQueries[] = $queryBuilder->getSQL();
         }
-        $customMessages[] = '<p>The following backend users have been deleted:</p><ul><li>' . implode('</li><li>', $usersFound) . '</li></ul>';
+        $customMessage = '<p>The following backend users have been deleted:</p><ul><li>' . implode('</li><li>', $usersFound) . '</li></ul>';
         $this->markWizardAsDone();
         return true;
     }
-- 
GitLab