From 8502ac334da63d297480884bd1079fe3406ae266 Mon Sep 17 00:00:00 2001 From: Markus Klein <markus.klein@typo3.org> Date: Thu, 16 Dec 2021 16:13:17 +0100 Subject: [PATCH] [BUGFIX] Handle missing $_SERVER['PATH_INFO'] Fix PHP8 warning issue if $_SERVER['PATH_INFO'] is not set. Resolves: #96373 Releases: main, 11.4 Change-Id: I427aee39c6f6389e418f27474c01cbfd973355e1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72696 Tested-by: Simon Gilli <typo3@gilbertsoft.org> Tested-by: Johannes Kasberger <johannes.kasberger@reelworx.at> Tested-by: core-ci <typo3@b13.com> Tested-by: Helmut Hummel <typo3@helhum.io> Reviewed-by: Simon Gilli <typo3@gilbertsoft.org> Reviewed-by: Johannes Kasberger <johannes.kasberger@reelworx.at> Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by: Helmut Hummel <typo3@helhum.io> --- typo3/sysext/core/Classes/Utility/GeneralUtility.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/core/Classes/Utility/GeneralUtility.php b/typo3/sysext/core/Classes/Utility/GeneralUtility.php index a72328b41572..089dc693ae73 100644 --- a/typo3/sysext/core/Classes/Utility/GeneralUtility.php +++ b/typo3/sysext/core/Classes/Utility/GeneralUtility.php @@ -2362,7 +2362,7 @@ class GeneralUtility // return FALSE for CGI-versions, but that is only as long as SCRIPT_NAME is set equal to PATH_INFO // because of PHP_SAPI=='cgi' (see above) if (!Environment::isRunningOnCgiServer()) { - $retVal = $_SERVER['PATH_INFO']; + $retVal = $_SERVER['PATH_INFO'] ?? ''; } break; case 'TYPO3_REV_PROXY': -- GitLab