Deprecation: #109544 - GeneralUtility::sanitizeLocalUrl() needs PSR-7 request
See forge#109544
Description
Calling
\TYPO3\ without
passing the current PSR-7 request as the second argument is deprecated. The method
previously resolved host and site information via
\TYPO3\, which falls back to server superglobals.
Passing the request explicitly allows the method to read this information from
\TYPO3\ instead.
Impact
Calling
\TYPO3\
with only one argument triggers a PHP
E_ error.
Affected installations
All installations that call
\TYPO3\ without
passing a
\Psr\ as the second argument.
The extension scanner will detect affected usages as a strong match.
Migration
Pass the current PSR-7 request as the second argument:
use TYPO3\CMS\Core\Utility\GeneralUtility;
- $url = GeneralUtility::sanitizeLocalUrl($url);
+ $url = GeneralUtility::sanitizeLocalUrl($url, $request);