[BUGFIX] Catchable fatal error when using the swap button
authorMarco Bresch <marco.bresch@starfinanz.de>
Fri, 16 Nov 2012 16:09:25 +0000 (17:09 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 4 Feb 2013 22:34:30 +0000 (23:34 +0100)
An error message is coming up if you push the swap button (double arrow).
The swap is realy done but you have to address the record once
again in the list or page view, because a error message
is still shown in the working frame on the right.

To reproduce this error select a page with multiple versions in a page or
list module in live workspace. You find the version module in the top of
right frame. Press the 'Version Management' button. Now you get the swap
button in front of each version.

Fixes: #42948
Releases: 6.1, 6.0, 4.7, 4.6, 4.5

Change-Id: I45b3e691932782d6e4085c989b1fe0809b5a34ab
Reviewed-on: https://review.typo3.org/18014
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/version/Classes/Hook/DataHandlerHook.php

index 6aa0e46..0ec062e 100644 (file)
@@ -90,6 +90,7 @@ class DataHandlerHook {
                        $commandIsProcessed = TRUE;
                        $action = (string) $value['action'];
                        $comment = (isset($value['comment']) && $value['comment'] ? $value['comment'] : $this->generalComment);
+                       $notificationAlternativeRecipients = (isset($value['notificationAlternativeRecipients'])) && is_array($value['notificationAlternativeRecipients']) ? $value['notificationAlternativeRecipients'] : array();
                        switch ($action) {
                        case 'new':
                                // check if page / branch versioning is needed,
@@ -109,7 +110,7 @@ class DataHandlerHook {
                                                $tcemainObj,
                                                $comment,
                                                TRUE,
-                                               $value['notificationAlternativeRecipients']
+                                               $notificationAlternativeRecipients
                                        );
                                break;
                        case 'clearWSID':
@@ -125,7 +126,7 @@ class DataHandlerHook {
                                                        $comment,
                                                        TRUE,
                                                        $tcemainObj,
-                                                       $value['notificationAlternativeRecipients']
+                                                       $notificationAlternativeRecipients
                                                );
                                }
                                break;