Skip to content
Snippets Groups Projects
Commit c6a09683 authored by Nicole Cordes's avatar Nicole Cordes Committed by Jigal van Hemert
Browse files

[BUGFIX] Use correct path variable on Windows

There is a difference between Apache and CLI exposing global path
configuration on Windows Systems. The CommandUtility uses the global
path to initialize an internal path storage for possible command
resources. The patch ensures both possible keys on Windows systems are
taken into account to resolve possible application locations.

Resolves: #83234
Releases: master, 8.7, 7.6
Change-Id: Id7166042e39c4f468c10c1c489c7fe5beae7a5fc
Reviewed-on: https://review.typo3.org/54940


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarJoerg Boesche <typo3@joergboesche.de>
Reviewed-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarJigal van Hemert <jigal.van.hemert@typo3.org>
Reviewed-by: default avatarJigal van Hemert <jigal.van.hemert@typo3.org>
parent d0051f12
No related merge requests found
......@@ -390,10 +390,10 @@ class CommandUtility
}
// Add path from environment
// @todo how does this work for WIN
if ($GLOBALS['_SERVER']['PATH']) {
if (!empty($GLOBALS['_SERVER']['PATH']) || !empty($GLOBALS['_SERVER']['Path'])) {
$sep = (TYPO3_OS === 'WIN' ? ';' : ':');
$envPath = GeneralUtility::trimExplode($sep, $GLOBALS['_SERVER']['PATH'], true);
$serverPath = $GLOBALS['_SERVER']['PATH'] ?? $GLOBALS['_SERVER']['Path'];
$envPath = GeneralUtility::trimExplode($sep, $serverPath, true);
foreach ($envPath as $val) {
$val = self::fixPath($val);
$sysPathArr[$val] = $val;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment