Bug #90422
Updated by Christian Eßl almost 5 years ago
Regression introduced with #87598. ExtensionService::getPluginNameByAction() now requires the arguments as strings: <pre><code class="php"> public function getPluginNameByAction($extensionName, string $controllerName, string $actionName): ?string { </code></pre> Both in ActionController::redirect() and UriBuilder::uriFor() you could (and can still) leave out all the arguments and make them null. Before you could write a redirect like this, leaving out the action: <pre><code class="php"> $this->redirect( null, // $actionName null, // $controllerName null, // $extensionName null, // $arguments 1 ); </code></pre> which would create a valid redirect to page 1. Now it will trigger the following error: <pre><code class="php"> Argument 3 passed to TYPO3\CMS\Extbase\Service\ExtensionService::getPluginNameByAction() must be of the type string, null given, called in /var/www/html/typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php on line 579 </code></pre> There are two options: * Make the $actionName argument of type ?string, preserving the old behaviour. * Or change Change the ActionController::redirect() method to require giving it an action name. (Would have to be checked inside the method as the action can either be given in $actionName or $arguments)