diff --git a/typo3/sysext/backend/Classes/Http/RouteDispatcher.php b/typo3/sysext/backend/Classes/Http/RouteDispatcher.php index 67e95aa53077bf09bc93b54ff6e21a4884c8e015..a13d078c0bbbe40e36aeda006e3ff97121c2b352 100644 --- a/typo3/sysext/backend/Classes/Http/RouteDispatcher.php +++ b/typo3/sysext/backend/Classes/Http/RouteDispatcher.php @@ -60,7 +60,7 @@ class RouteDispatcher extends Dispatcher $targetIdentifier = $route->getOption('target'); $target = $this->getCallableFromTarget($targetIdentifier); $arguments = [$request]; - return call_user_func_array($target, $arguments); + return $target(...$arguments); } /** diff --git a/typo3/sysext/backend/Classes/Tree/Repository/PageTreeRepository.php b/typo3/sysext/backend/Classes/Tree/Repository/PageTreeRepository.php index 5a08271f25d673fd727392df4b0880299bdb6353..5fa61163b2cfb30a1d70798357076fcbc30e8549 100644 --- a/typo3/sysext/backend/Classes/Tree/Repository/PageTreeRepository.php +++ b/typo3/sysext/backend/Classes/Tree/Repository/PageTreeRepository.php @@ -155,7 +155,7 @@ class PageTreeRepository return; } foreach ($tree['_children'] as $k => &$childPage) { - if (!call_user_func_array($callback, [$childPage])) { + if (!$callback($childPage)) { unset($tree['_children'][$k]); continue; } diff --git a/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php b/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php index 03fc558e3a8574f10fe976e0926353e0eb3bf8fb..ac097049cfd917822231d96b23c7702ae93777c7 100644 --- a/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php +++ b/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php @@ -882,7 +882,7 @@ class FlexFormTools */ protected function executeCallBackMethod($methodName, array $parameterArray) { - return call_user_func_array([$this->callBackObj, $methodName], $parameterArray); + return $this->callBackObj->$methodName(...$parameterArray); } /*********************************** diff --git a/typo3/sysext/core/Classes/Console/CommandApplication.php b/typo3/sysext/core/Classes/Console/CommandApplication.php index 3a637e9b3715151cf2fa1833f8bece7b3cffee2c..6951904389e2906206afe839b086fe9c3d33c881 100644 --- a/typo3/sysext/core/Classes/Console/CommandApplication.php +++ b/typo3/sysext/core/Classes/Console/CommandApplication.php @@ -110,7 +110,7 @@ class CommandApplication implements ApplicationInterface $exitCode = $this->application->run($input, $output); if ($execute !== null) { - call_user_func($execute); + $execute(); } exit($exitCode); diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php index 49a0126c8a5380e46796c6a1b6f4ee3b00a65801..c7d71010ff277074cc9e1a670ce0c3229ff305df 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -6182,7 +6182,7 @@ class DataHandler implements LoggerAwareInterface if (!empty($remapAction['func'])) { $callable = [$this, $remapAction['func']]; if (is_callable($callable)) { - $newValue = call_user_func_array($callable, $remapAction['args']); + $newValue = $callable(...$remapAction['args']); } } // If array is returned, check for maxitems condition, if string is returned this was already done: @@ -6252,7 +6252,7 @@ class DataHandler implements LoggerAwareInterface if ($this->remapStackActions) { foreach ($this->remapStackActions as $action) { if (isset($action['callback'], $action['arguments'])) { - call_user_func_array($action['callback'], $action['arguments']); + $action['callback'](...$action['arguments']); } } } diff --git a/typo3/sysext/core/Classes/DataHandling/SlugHelper.php b/typo3/sysext/core/Classes/DataHandling/SlugHelper.php index 88359ee319f2527d903f15fbd995e426b21199df..d5fca085c6e3344acff27142fcb294bdf3176604 100644 --- a/typo3/sysext/core/Classes/DataHandling/SlugHelper.php +++ b/typo3/sysext/core/Classes/DataHandling/SlugHelper.php @@ -382,7 +382,7 @@ class SlugHelper $newValue = $slug; $counter = 0; while ( - !call_user_func($isUnique, $newValue, $state) + !$isUnique($newValue, $state) && ++$counter < 100 ) { $newValue = $this->sanitize($rawValue . '-' . $counter); diff --git a/typo3/sysext/core/Classes/Database/RelationHandler.php b/typo3/sysext/core/Classes/Database/RelationHandler.php index 4984ca7a5113602a7fc2e817061ac6f407de5554..05399643e89a4d54cba7585e32684c9ad25e57ca 100644 --- a/typo3/sysext/core/Classes/Database/RelationHandler.php +++ b/typo3/sysext/core/Classes/Database/RelationHandler.php @@ -1409,7 +1409,7 @@ class RelationHandler $purgedItemIds = []; $callable =[$this, $purgeCallback]; if (is_callable($callable)) { - $purgedItemIds = call_user_func($callable, $itemTableName, $itemIds); + $purgedItemIds = $callable($itemTableName, $itemIds); } $removedItemIds = array_diff($itemIds, $purgedItemIds); diff --git a/typo3/sysext/core/Classes/Http/AbstractApplication.php b/typo3/sysext/core/Classes/Http/AbstractApplication.php index 0b2d2d28807e90746b2d40d5c96065e09dea1867..3e77c6d52c902b7fd833a38e918e0cdd7cad3c9a 100644 --- a/typo3/sysext/core/Classes/Http/AbstractApplication.php +++ b/typo3/sysext/core/Classes/Http/AbstractApplication.php @@ -97,7 +97,7 @@ abstract class AbstractApplication implements ApplicationInterface, RequestHandl ServerRequestFactory::fromGlobals() ); if ($execute !== null) { - call_user_func($execute); + $execute(); } } catch (ImmediateResponseException $exception) { $response = $exception->getResponse(); diff --git a/typo3/sysext/core/Classes/Http/Dispatcher.php b/typo3/sysext/core/Classes/Http/Dispatcher.php index 0542d02e86a785a501d75630ada1a5a4d4440eff..7d62375bd3d9897b0ab0c71f01fa85eb611f3416 100644 --- a/typo3/sysext/core/Classes/Http/Dispatcher.php +++ b/typo3/sysext/core/Classes/Http/Dispatcher.php @@ -50,12 +50,12 @@ class Dispatcher implements DispatcherInterface $targetIdentifier = $request->getAttribute('target'); $target = $this->getCallableFromTarget($targetIdentifier); $arguments = [$request]; - return call_user_func_array($target, $arguments); + return $target(...$arguments); } /** * Creates a callable out of the given parameter, which can be a string, a callable / closure or an array - * which can be handed to call_user_func_array() + * which can be invoked as a function. * * @param array|string|callable $target the target which is being resolved. * @return callable diff --git a/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php b/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php index c150418c17fdd1d7b26172ef5a2a5a7e19fa8dad..6cf4e8782f25dd686f2ff5084923e7f50008f525 100644 --- a/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php +++ b/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php @@ -422,9 +422,9 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver implements Stream { foreach ($filterMethods as $filter) { if (is_callable($filter)) { - $result = call_user_func($filter, $itemName, $itemIdentifier, $parentIdentifier, [], $this); - // We have to use -1 as the „don't include“ return value, as call_user_func() will return FALSE - // If calling the method succeeded and thus we can't use that as a return value. + $result = $filter($itemName, $itemIdentifier, $parentIdentifier, [], $this); + // We use -1 as the "don't include“ return value, for historic reasons, + // as call_user_func() used to return FALSE if calling the method failed. if ($result === -1) { return false; } diff --git a/typo3/sysext/core/Classes/Resource/Filter/FileExtensionFilter.php b/typo3/sysext/core/Classes/Resource/Filter/FileExtensionFilter.php index efac558cb4687160abaaa07e835ee87c9cd11405..a17310494915806a9a863bd8cd8189a8bd637be1 100644 --- a/typo3/sysext/core/Classes/Resource/Filter/FileExtensionFilter.php +++ b/typo3/sysext/core/Classes/Resource/Filter/FileExtensionFilter.php @@ -84,8 +84,8 @@ class FileExtensionFilter /** * Entry method for use as filelist filter. * - * We have to use -1 as the „don't include“ return value, as call_user_func() will return FALSE - * if calling the method failed and thus we can't use that as a return value. + * We use -1 as the "don't include“ return value, for historic reasons, + * as call_user_func() used to return FALSE if calling the method failed. * * @param string $itemName * @param string $itemIdentifier diff --git a/typo3/sysext/core/Classes/Resource/Filter/FileNameFilter.php b/typo3/sysext/core/Classes/Resource/Filter/FileNameFilter.php index d47232b1f2b00cc7f8a0fc48431ba0d6b77a9d74..fc4638907c2f3a49d4f0d5cd6daa80075379f19f 100644 --- a/typo3/sysext/core/Classes/Resource/Filter/FileNameFilter.php +++ b/typo3/sysext/core/Classes/Resource/Filter/FileNameFilter.php @@ -32,8 +32,8 @@ class FileNameFilter /** * Filter method that checks if a file/folder name starts with a dot (e.g. .htaccess) * - * We have to use -1 as the „don't include“ return value, as call_user_func() will return FALSE - * If calling the method succeeded and thus we can't use that as a return value. + * We use -1 as the "don't include“ return value, for historic reasons, + * as call_user_func() used to return FALSE if calling the method failed. * * @param string $itemName * @param string $itemIdentifier diff --git a/typo3/sysext/core/Classes/Resource/Search/Result/DriverFilteredSearchResult.php b/typo3/sysext/core/Classes/Resource/Search/Result/DriverFilteredSearchResult.php index befbf85afecfff9a341d50e55bbceb1c3285bf5a..019c3820226e18b26815eb6c7b02dd3463c8586b 100644 --- a/typo3/sysext/core/Classes/Resource/Search/Result/DriverFilteredSearchResult.php +++ b/typo3/sysext/core/Classes/Resource/Search/Result/DriverFilteredSearchResult.php @@ -142,8 +142,8 @@ class DriverFilteredSearchResult implements FileSearchResultInterface continue; } $result = $filter($itemName, $itemIdentifier, $parentIdentifier, [], $this->driver); - // We have to use -1 as the „don't include“ return value, as call_user_func() will return FALSE - // If calling the method succeeded and thus we can't use that as a return value. + // We use -1 as the "don't include“ return value, for historic reasons, + // as call_user_func() used to return FALSE if calling the method failed. if ($result === -1) { $matches = false; } diff --git a/typo3/sysext/core/Classes/Utility/ArrayUtility.php b/typo3/sysext/core/Classes/Utility/ArrayUtility.php index 6b638725fa935e02187bc11e53e2fb03f175ab99..c3657c27329f723e17ea225ace4a792f628ac2d6 100644 --- a/typo3/sysext/core/Classes/Utility/ArrayUtility.php +++ b/typo3/sysext/core/Classes/Utility/ArrayUtility.php @@ -698,7 +698,7 @@ class ArrayUtility $keepItems = array_flip($keepItems); foreach ($array as $key => $value) { // Get the value to compare by using the callback function: - $keepValue = isset($getValueFunc) ? call_user_func($getValueFunc, $value) : $value; + $keepValue = isset($getValueFunc) ? $getValueFunc($value) : $value; if (!isset($keepItems[$keepValue])) { unset($array[$key]); } @@ -862,7 +862,7 @@ class ArrayUtility $array[$key] = self::filterRecursive($value, $callback); } - if (!call_user_func($callback, $value)) { + if (!$callback($value)) { unset($array[$key]); } } diff --git a/typo3/sysext/core/Classes/Utility/GeneralUtility.php b/typo3/sysext/core/Classes/Utility/GeneralUtility.php index 8e128d88f340c563e46ad570d6e7aa07d79e8f4b..cbe3ea393c7e54a6d79fbb44298c4381191db4f7 100644 --- a/typo3/sysext/core/Classes/Utility/GeneralUtility.php +++ b/typo3/sysext/core/Classes/Utility/GeneralUtility.php @@ -623,15 +623,12 @@ class GeneralUtility $ipad = str_repeat(chr(54), $hashBlocksize); if (strlen($secret) > $hashBlocksize) { // Keys longer than block size are shorten - $key = str_pad(pack('H*', call_user_func($hashAlgorithm, $secret)), $hashBlocksize, "\0"); + $key = str_pad(pack('H*', $hashAlgorithm($secret)), $hashBlocksize, "\0"); } else { // Keys shorter than block size are zero-padded $key = str_pad($secret, $hashBlocksize, "\0"); } - $hmac = call_user_func($hashAlgorithm, ($key ^ $opad) . pack('H*', call_user_func( - $hashAlgorithm, - ($key ^ $ipad) . $input - ))); + $hmac = $hashAlgorithm(($key ^ $opad) . pack('H*', $hashAlgorithm(($key ^ $ipad) . $input))); } return $hmac; } diff --git a/typo3/sysext/core/Tests/Functional/Error/ErrorHandlerTest.php b/typo3/sysext/core/Tests/Functional/Error/ErrorHandlerTest.php index 1ac6d991cea42249aedcbb846f5d13057746496f..596f3b08b0fdbedad5ec08cf30e159448d6baaea 100644 --- a/typo3/sysext/core/Tests/Functional/Error/ErrorHandlerTest.php +++ b/typo3/sysext/core/Tests/Functional/Error/ErrorHandlerTest.php @@ -113,7 +113,7 @@ class ErrorHandlerTest extends FunctionalTestCase { // process errors if ($this->existingHandler !== null) { - return call_user_func($this->existingHandler, $code, $message, $file, $line, $context); + return ($this->existingHandler)($code, $message, $file, $line, $context); } return false; diff --git a/typo3/sysext/core/Tests/Functional/IO/PharStreamWrapperInterceptorTest.php b/typo3/sysext/core/Tests/Functional/IO/PharStreamWrapperInterceptorTest.php index 3bf3ad6cff4ed1fbeb1d167708727370a21b0c54..14a3e53d0b3b54291900bf05427608eb1e8272ae 100644 --- a/typo3/sysext/core/Tests/Functional/IO/PharStreamWrapperInterceptorTest.php +++ b/typo3/sysext/core/Tests/Functional/IO/PharStreamWrapperInterceptorTest.php @@ -213,7 +213,7 @@ class PharStreamWrapperInterceptorTest extends FunctionalTestCase self::assertSame( $expectation, - call_user_func($functionName, 'phar://' . $path) + $functionName('phar://' . $path) ); } @@ -282,7 +282,7 @@ class PharStreamWrapperInterceptorTest extends FunctionalTestCase self::expectExceptionCode(1539625084); $path = $this->instancePath . '/' . $path; - call_user_func($functionName, 'phar://' . $path); + $functionName('phar://' . $path); } /** diff --git a/typo3/sysext/core/Tests/Unit/FormProtection/FormProtectionFactoryTest.php b/typo3/sysext/core/Tests/Unit/FormProtection/FormProtectionFactoryTest.php index fc1326b53f9eb86d38addbf7715e1b9df840f08c..9bb65d2a4909192539581f3f12b9228acaafb9c9 100644 --- a/typo3/sysext/core/Tests/Unit/FormProtection/FormProtectionFactoryTest.php +++ b/typo3/sysext/core/Tests/Unit/FormProtection/FormProtectionFactoryTest.php @@ -90,8 +90,8 @@ class FormProtectionFactoryTest extends UnitTestCase $this->createMock(Registry::class) ]; self::assertSame( - call_user_func_array([FormProtectionFactory::class, 'get'], $arguments), - call_user_func_array([FormProtectionFactory::class, 'get'], $arguments) + FormProtectionFactory::get(...$arguments), + FormProtectionFactory::get(...$arguments) ); } diff --git a/typo3/sysext/core/Tests/Unit/Log/LoggerTest.php b/typo3/sysext/core/Tests/Unit/Log/LoggerTest.php index 57d09260b9ef6bd321c9e6b4a07653475deed281..12693d9538bd33e30bee7f6fbf5a90576600c65c 100644 --- a/typo3/sysext/core/Tests/Unit/Log/LoggerTest.php +++ b/typo3/sysext/core/Tests/Unit/Log/LoggerTest.php @@ -159,7 +159,7 @@ class LoggerTest extends UnitTestCase $logger = new Logger('test.core.log'); $writer = new WriterFixture(); $logger->addWriter(LogLevel::DEBUG, $writer); - call_user_func([$logger, $shorthandMethod], 'test message'); + $logger->$shorthandMethod('test message'); self::assertNotEmpty($writer->getRecords()); } diff --git a/typo3/sysext/core/Tests/Unit/Resource/FileTest.php b/typo3/sysext/core/Tests/Unit/Resource/FileTest.php index 7582c1627e3d74f911bebe8e0d5cc568670f86b7..cd45928842b6f1e34ad84afd58437906ab6dd5cb 100644 --- a/typo3/sysext/core/Tests/Unit/Resource/FileTest.php +++ b/typo3/sysext/core/Tests/Unit/Resource/FileTest.php @@ -74,7 +74,7 @@ class FileTest extends UnitTestCase ]; $fixture = new File($properties, $this->storageMock); foreach ($properties as $key => $value) { - self::assertEquals($value, call_user_func([$fixture, 'get' . $key])); + self::assertEquals($value, $fixture->{'get' . $key}()); } } diff --git a/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php b/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php index d23877d91466aeb499172a67f2dbde7052c75a3f..2b8e1119d1535efe917b4e76e71bd379db46c9b3 100644 --- a/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php +++ b/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php @@ -472,10 +472,8 @@ abstract class ActionController implements ControllerInterface $actionInitializationMethodName = 'initialize' . ucfirst($this->actionMethodName); /** @var callable $callable */ $callable = [$this, $actionInitializationMethodName]; - if (method_exists($this, $actionInitializationMethodName)) { - // todo: replace method_exists with is_callable or even both - // method_exists alone does not guarantee that $callable is actually callable - call_user_func($callable); + if (is_callable($callable)) { + $callable(); } $this->mapRequestArgumentsToControllerArguments(); $this->controllerContext = $this->buildControllerContext(); diff --git a/typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php b/typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php index 0a3c2c31cc07142ffb08f78a49a19ee3aa7b23ff..673acb0d28a3815e388256d51d280c09e831ad5b 100644 --- a/typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php +++ b/typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php @@ -147,7 +147,7 @@ class LazyLoadingProxy implements \Iterator, LoadingStrategyInterface } /** @var callable $callable */ $callable = [$realInstance, $methodName]; - return call_user_func_array($callable, $arguments); + return $callable(...$arguments); } /** diff --git a/typo3/sysext/extbase/Classes/Property/TypeConverter/ObjectConverter.php b/typo3/sysext/extbase/Classes/Property/TypeConverter/ObjectConverter.php index 0793d0d14d47aa2dcd64203c64a4ecc233900ca6..7aa3e991b8168024002d0f1a071b2c1c2edad627 100644 --- a/typo3/sysext/extbase/Classes/Property/TypeConverter/ObjectConverter.php +++ b/typo3/sysext/extbase/Classes/Property/TypeConverter/ObjectConverter.php @@ -257,7 +257,7 @@ class ObjectConverter extends AbstractTypeConverter throw new InvalidTargetException('Missing constructor argument "' . $parameterName . '" for object of type "' . $objectType . '".', 1268734872); } } - return call_user_func_array([$this->objectManager, 'get'], array_merge([$objectType], $constructorArguments)); + return $this->objectManager->get(...[$objectType, ...$constructorArguments]); } return $this->objectManager->get($objectType); } diff --git a/typo3/sysext/extbase/Classes/SignalSlot/Dispatcher.php b/typo3/sysext/extbase/Classes/SignalSlot/Dispatcher.php index 0cb95f5b4524666ed05cd33274c35c7c0ea0791d..724d2620aab1469351910f1c5aa76e075c7dcb0d 100644 --- a/typo3/sysext/extbase/Classes/SignalSlot/Dispatcher.php +++ b/typo3/sysext/extbase/Classes/SignalSlot/Dispatcher.php @@ -144,7 +144,7 @@ class Dispatcher implements SingletonInterface $preparedSlotArguments[] = $signalClassName . '::' . $signalName; } - $slotReturn = call_user_func_array($callable, $preparedSlotArguments); + $slotReturn = $callable(...$preparedSlotArguments); if ($slotReturn) { if (!is_array($slotReturn)) { diff --git a/typo3/sysext/extbase/Tests/Unit/Property/PropertyMappingConfigurationTest.php b/typo3/sysext/extbase/Tests/Unit/Property/PropertyMappingConfigurationTest.php index 5ed579c6a2f300c419bbf86671ece70a4385f53d..a2eceb129b023c6a3d01cbca0ab63633d016284e 100644 --- a/typo3/sysext/extbase/Tests/Unit/Property/PropertyMappingConfigurationTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Property/PropertyMappingConfigurationTest.php @@ -223,7 +223,7 @@ class PropertyMappingConfigurationTest extends UnitTestCase */ public function respectiveMethodsProvideFluentInterface($methodToTestForFluentInterface, array $argumentsForMethod = []) { - $actualResult = call_user_func_array([$this->propertyMappingConfiguration, $methodToTestForFluentInterface], $argumentsForMethod); + $actualResult = $this->propertyMappingConfiguration->$methodToTestForFluentInterface(...$argumentsForMethod); self::assertSame($this->propertyMappingConfiguration, $actualResult); } diff --git a/typo3/sysext/filelist/Classes/FileFacade.php b/typo3/sysext/filelist/Classes/FileFacade.php index 32741b66e7ab2d4a002e5754eb74e3b3defda502..c4d28145afcf0a97ab2bfa385d265a79c114bab2 100644 --- a/typo3/sysext/filelist/Classes/FileFacade.php +++ b/typo3/sysext/filelist/Classes/FileFacade.php @@ -98,7 +98,7 @@ class FileFacade $uid = 0; $method = 'getMetadata'; if (is_callable([$this->resource, $method])) { - $metadata = call_user_func([$this->resource, $method]); + $metadata = $this->resource->$method(); if (isset($metadata['uid'])) { $uid = (int)$metadata['uid']; @@ -123,7 +123,7 @@ class FileFacade { $method = 'getReadablePath'; if (is_callable([$this->resource->getParentFolder(), $method])) { - return call_user_func([$this->resource->getParentFolder(), $method]); + return $this->resource->getParentFolder()->$method(); } return ''; @@ -176,7 +176,7 @@ class FileFacade { $method = 'checkActionPermission'; if (is_callable([$this->resource, $method])) { - return call_user_func_array([$this->resource, $method], ['read']); + return $this->resource->$method('read'); } return false; @@ -189,7 +189,7 @@ class FileFacade { $method = 'checkActionPermission'; if (is_callable([$this->resource, $method])) { - return call_user_func_array([$this->resource, $method], ['write']); + return $this->resource->$method('write'); } return false; @@ -202,7 +202,7 @@ class FileFacade { $method = 'checkActionPermission'; if (is_callable([$this->resource, $method])) { - return call_user_func_array([$this->resource, $method], ['replace']); + return $this->resource->$method('replace'); } return false; @@ -215,7 +215,7 @@ class FileFacade { $method = 'checkActionPermission'; if (is_callable([$this->resource, $method])) { - return call_user_func_array([$this->resource, $method], ['rename']); + return $this->resource->$method('rename'); } return false; @@ -228,7 +228,7 @@ class FileFacade { $method = 'checkActionPermission'; if (is_callable([$this->resource, $method])) { - return call_user_func_array([$this->resource, $method], ['copy']); + return $this->resource->$method('copy'); } return false; @@ -241,7 +241,7 @@ class FileFacade { $method = 'checkActionPermission'; if (is_callable([$this->resource, $method])) { - return call_user_func_array([$this->resource, $method], ['move']); + return $this->resource->$method('move'); } return false; @@ -254,7 +254,7 @@ class FileFacade { $method = 'checkActionPermission'; if (is_callable([$this->resource, $method])) { - return call_user_func_array([$this->resource, $method], ['delete']); + return $this->resource->$method('delete'); } return false; diff --git a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php index fc14ca930b09f960d9e520c9fb642bfbb9e1909b..e532f830e3543688fe1c18d8ad357d30a7fb7071 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php +++ b/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php @@ -5181,11 +5181,7 @@ class ContentObjectRenderer implements LoggerAwareInterface $callable = [$classObj, $methodName]; if (is_object($classObj) && method_exists($classObj, $parts[1]) && is_callable($callable)) { $classObj->cObj = $this; - $content = call_user_func_array($callable, [ - $content, - $conf, - $this->getRequest() - ]); + $content = $callable($content, $conf, $this->getRequest()); } else { $this->getTimeTracker()->setTSlogMessage('Method "' . $parts[1] . '" did not exist in class "' . $parts[0] . '"', 3); } diff --git a/typo3/sysext/frontend/Tests/Functional/SiteHandling/AbstractTestCase.php b/typo3/sysext/frontend/Tests/Functional/SiteHandling/AbstractTestCase.php index df63f3754822c5c4dcbeb967cba8f273aaa61305..3af7974c59e855bc450647a9077ec3cf89ab07a9 100644 --- a/typo3/sysext/frontend/Tests/Functional/SiteHandling/AbstractTestCase.php +++ b/typo3/sysext/frontend/Tests/Functional/SiteHandling/AbstractTestCase.php @@ -106,7 +106,7 @@ abstract class AbstractTestCase extends FunctionalTestCase array_map( function (array $values) use ($template, $callback) { if ($callback !== null) { - $values = call_user_func($callback, $values); + $values = $callback($values); } return vsprintf($template, $values); }, diff --git a/typo3/sysext/recycler/Classes/Controller/RecyclerModuleController.php b/typo3/sysext/recycler/Classes/Controller/RecyclerModuleController.php index 5ebd100fb6ee0116ef8147f9f2972da319a4ba7d..8701d60c7bbe49c7ef03dec84d83a875d0ac6ab6 100644 --- a/typo3/sysext/recycler/Classes/Controller/RecyclerModuleController.php +++ b/typo3/sysext/recycler/Classes/Controller/RecyclerModuleController.php @@ -123,7 +123,7 @@ class RecyclerModuleController $action = 'index'; $this->initializeView($action); - $result = call_user_func_array([$this, $action . 'Action'], [$request]); + $result = $this->{$action . 'Action'}($request); if ($result instanceof ResponseInterface) { return $result; }