[BUGFIX] Force command controller task arguments saved as array
authorMarc Bastian Heinrichs <typo3@mbh-software.de>
Sat, 17 Nov 2012 19:17:03 +0000 (20:17 +0100)
committerAlexander Schnitzler <typo3@alexanderschnitzler.de>
Mon, 19 Nov 2012 14:15:13 +0000 (15:15 +0100)
Executing command controller scheduler tasks without
action arguments fails because the arguments aren't saved as
array in the serialized task which is required for setting the request
arguments. Solution: cast the sumitted arguments to array.

Change-Id: Ie8b7d11fa6bfd666b720b387523c825d32b3876a
Fixes: #37563
Releases: 4.7, 6.0
Reviewed-on: http://review.typo3.org/16539
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Ingo Pfennigstorf
Reviewed-by: Alexander Schnitzler
Tested-by: Alexander Schnitzler
typo3/sysext/extbase/Classes/Scheduler/FieldProvider.php

index afc8bd2..6086ed8 100644 (file)
@@ -107,7 +107,7 @@ class FieldProvider implements \TYPO3\CMS\Scheduler\AdditionalFieldProviderInter
         */
        public function saveAdditionalFields(array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task) {
                $task->setCommandIdentifier($submittedData['task_extbase']['action']);
-               $task->setArguments($submittedData['task_extbase']['arguments']);
+               $task->setArguments((array)$submittedData['task_extbase']['arguments']);
                return TRUE;
        }
 
@@ -326,4 +326,4 @@ class FieldProvider implements \TYPO3\CMS\Scheduler\AdditionalFieldProviderInter
 }
 
 
-?>
\ No newline at end of file
+?>