#20392cli_dispatch.phpsh: server variable $_SERVER['PWD'] on windows systems not available
Description
In the CLI Interface (cli_dispatch.phpsh) is the server variable $_SERVER[‘PWD’] on windows systems not available. PHP throw a notice, because the script don’t fetch the unset variable. Then the script throw a lot of warings “Can not modify header information…”. The problem is also in the TYPO3 version 4.2.6.
example for a better solution (line 68 in cli_dispatch.phpsh)
// on windows don’t exist $_SERVER[‘PWD’]. This throw a php notice
// check the key existence with array_key_exists.
if (array_key_exists(‘PWD’, $_SERVER)) {
$workingDirectory = $_SERVER[‘PWD’] ? $_SERVER[‘PWD’] : getcwd();
}
else {
$workingDirectory = getcwd();
}
(issue imported from #M11031)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.