[BUGFIX] Fix exception in FE when using predefined admPanel config 12/54112/3
authorMarkus Klein <markus.klein@typo3.org>
Mon, 11 Sep 2017 11:14:27 +0000 (13:14 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Thu, 21 Sep 2017 12:10:44 +0000 (14:10 +0200)
Enforcing the admPanel for users via user TSconfig is working again
without crashing the FE.

We make sure that when the admPanel configuration is fetched, we
do not fall back to the toplevel value if the requested sub-value
does not exist.

Resolves: #82460
Releases: master, 8.7, 7.6
Change-Id: Ibd288805aa6c91d74eee8a9c80ebcce62d1f860f
Reviewed-on: https://review.typo3.org/54112
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/frontend/Classes/View/AdminPanelView.php

index 8d08ff3..ff16a7f 100644 (file)
@@ -212,7 +212,7 @@ class AdminPanelView
         if ($val && isset($beUser->extAdminConfig['override.'][$sectionName . '.'][$val])) {
             return $beUser->extAdminConfig['override.'][$sectionName . '.'][$val];
         }
-        if (isset($beUser->extAdminConfig['override.'][$sectionName])) {
+        if (!$val && isset($beUser->extAdminConfig['override.'][$sectionName])) {
             return $beUser->extAdminConfig['override.'][$sectionName];
         }