Actions
Bug #20392
closedcli_dispatch.phpsh: server variable $_SERVER['PWD'] on windows systems not available
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-05-05
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
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)
Actions