[BUGFIX] Data in request may be null instead of an array 40/46640/2
authorXavier Perseguers <xavier@typo3.org>
Mon, 25 Jan 2016 14:24:46 +0000 (15:24 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Sat, 13 Feb 2016 14:55:36 +0000 (15:55 +0100)
Change-Id: I85f8c80ca29a7795242c9c284f235c6520b2a72d
Releases: master, 7.6
Resolves: #72933
Reviewed-on: https://review.typo3.org/46640
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Classes/ExtDirect/ExtDirectRouter.php

index 919258e..e118eb4 100755 (executable)
@@ -73,7 +73,7 @@ class ExtDirectRouter
                     'action' => $singleRequest->action,
                     'method' => $singleRequest->method
                 );
-                $token = array_pop($singleRequest->data);
+                $token = is_array($singleRequest->data) ? array_pop($singleRequest->data) : null;
                 if ($firstCall) {
                     $firstCall = false;
                     $formprotection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();