[FOLLOWUP][BUGFIX] Clear affected caches on page publishing 09/42309/5
authorDaniel Goerz <ervaude@gmail.com>
Thu, 6 Aug 2015 10:42:10 +0000 (12:42 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Thu, 6 Aug 2015 15:40:41 +0000 (17:40 +0200)
Prevent accessing an array key of a non-array.

Resolves: #37952
Releases: master, 6.2
Change-Id: I42de4ae3fb2f697a1bdcde323cd33ba68018af28
Reviewed-on: http://review.typo3.org/42309
Reviewed-by: Sascha Wilking <sascha.wilking@hmmh.de>
Tested-by: Sascha Wilking <sascha.wilking@hmmh.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
typo3/sysext/frontend/Classes/Hooks/TreelistCacheUpdateHooks.php

index 6414260..dee37b5 100644 (file)
@@ -100,7 +100,7 @@ class TreelistCacheUpdateHooks {
         * @return void
         */
        public function processCmdmap_postProcess($command, $table, $recordId, $commandValue, DataHandler $tceMain) {
-               $action = (string)$commandValue['action'];
+               $action = (is_array($commandValue) && isset($commandValue['action'])) ? (string)$commandValue['action'] : '';
                if ($table === 'pages' && ($command === 'delete' || ($command === 'version' && $action === 'swap'))) {
 
                        $affectedRecord = BackendUtility::getRecord($table, $recordId, '*', '', FALSE);