[BUGFIX] Fix publish button in preview mode
authorTolleiv Nietsch <info@tolleiv.de>
Sun, 15 Jan 2012 02:47:41 +0000 (03:47 +0100)
committerTolleiv Nietsch <info@tolleiv.de>
Sun, 22 Jan 2012 20:11:13 +0000 (21:11 +0100)
Due to an wrong type check the publish button in the
preview window is broken.

Change-Id: I401d9d275dd2c3e39eb1a6ecbe215b776f5f7cea
Fixes: #33093
Releases: 4.6, 4.7
Reviewed-on: http://review.typo3.org/7809
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
typo3/sysext/workspaces/Classes/ExtDirect/ActionHandler.php

index b0fc4be..8a55e96 100644 (file)
@@ -321,7 +321,7 @@ class Tx_Workspaces_ExtDirect_ActionHandler extends Tx_Workspaces_ExtDirect_Abst
                if (t3lib_utility_Math::canBeInterpretedAsInteger($stageId) === FALSE) {
                        throw new InvalidArgumentException('Missing "stageId" in $parameters array.', 1319488194);
                }
-               if (!is_array($parameters->affects) || count($parameters->affects) == 0) {
+               if (!is_object($parameters->affects) || count($parameters->affects) == 0) {
                        throw new InvalidArgumentException('Missing "affected items" in $parameters array.', 1319488195);
                }