[BUGFIX] Check if install tool enable file exists before removing it 01/52101/2
authorMichael Stucki <michael.stucki@typo3.org>
Mon, 20 Mar 2017 13:04:43 +0000 (14:04 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 20 Mar 2017 17:37:36 +0000 (18:37 +0100)
The is_file() check got lost during the refactoring in
d855b4707ba1198b6c1dbf856c4377e230da4c4b.

Change-Id: Ia1688099a7ccd32667562e8c7f83fd54bb669f4a
Resolves: #80354
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/52101
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/Classes/Controller/Action/Step/DefaultConfiguration.php
typo3/sysext/install/Classes/Controller/ToolController.php

index fa26bd1..71cd440 100644 (file)
@@ -128,7 +128,7 @@ For each website you need a TypoScript template on the main page of your website
         );
         $formProtection->clean();
 
-        if (!EnableFileService::isInstallToolEnableFilePermanent()) {
+        if (EnableFileService::installToolEnableFileExists() && !EnableFileService::isInstallToolEnableFilePermanent()) {
             EnableFileService::removeInstallToolEnableFile();
         }
 
index 0ce0384..d1bbb28 100644 (file)
@@ -73,7 +73,7 @@ class ToolController extends AbstractController
     {
         $action = $this->getAction();
         if ($action === 'logout') {
-            if (!EnableFileService::isInstallToolEnableFilePermanent()) {
+            if (EnableFileService::installToolEnableFileExists() && !EnableFileService::isInstallToolEnableFilePermanent()) {
                 EnableFileService::removeInstallToolEnableFile();
             }