Skip to content
Snippets Groups Projects
Commit 4e2ac2e4 authored by Christopher Smith's avatar Christopher Smith
Browse files

add missing $_SERVER values for init.php when called from cli

parent 1d82c8d3
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,13 @@ $default_server_vars = array(
'REQUEST_TIME' => time(),
);
// fixup for $_SERVER when run from CLI,
// some values should be mocked for use by inc/init.php which is called here
// [ $_SERVER is also mocked in TestRequest::execute() ]
if (php_sapi_name() == 'cli') {
$_SERVER = array_merge($default_server_vars, $_SERVER);
}
// create temp directories
mkdir(TMP_DIR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment