diff --git a/typo3/sysext/core/Classes/Utility/CommandUtility.php b/typo3/sysext/core/Classes/Utility/CommandUtility.php index 6df819ee67f7588de061706bd787d622de49eb14..52500f1197516746c0699d0ac65cccda47c3769e 100644 --- a/typo3/sysext/core/Classes/Utility/CommandUtility.php +++ b/typo3/sysext/core/Classes/Utility/CommandUtility.php @@ -399,11 +399,11 @@ class CommandUtility } } - // Add path from environment - // @todo how does this work for WIN - if ($GLOBALS['_SERVER']['PATH']) { - $sep = (TYPO3_OS == 'WIN' ? ';' : ':'); - $envPath = GeneralUtility::trimExplode($sep, $GLOBALS['_SERVER']['PATH'], true); + // Add path from environment + if (!empty($GLOBALS['_SERVER']['PATH']) || !empty($GLOBALS['_SERVER']['Path'])) { + $sep = (TYPO3_OS === 'WIN' ? ';' : ':'); + $serverPath = !empty($GLOBALS['_SERVER']['PATH']) ? $GLOBALS['_SERVER']['PATH'] : $GLOBALS['_SERVER']['Path']; + $envPath = GeneralUtility::trimExplode($sep, $serverPath, true); foreach ($envPath as $val) { $val = self::fixPath($val); $sysPathArr[$val] = $val;