diff options
Diffstat (limited to 'sapi/cli/tests/php_cli_server.inc')
| -rw-r--r-- | sapi/cli/tests/php_cli_server.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sapi/cli/tests/php_cli_server.inc b/sapi/cli/tests/php_cli_server.inc index 26abe5492a..ab754eb408 100644 --- a/sapi/cli/tests/php_cli_server.inc +++ b/sapi/cli/tests/php_cli_server.inc @@ -5,7 +5,9 @@ function php_cli_server_start($code = 'echo "Hello world";', $no_router = FALSE) $php_executable = getenv('TEST_PHP_EXECUTABLE'); $doc_root = __DIR__; $router = "index.php"; - file_put_contents($doc_root . '/' . $router, '<?php ' . $code . ' ?>'); + if ($code) { + file_put_contents($doc_root . '/' . $router, '<?php ' . $code . ' ?>'); + } $descriptorspec = array( 0 => STDIN, |
