Skip to content

Commit 6043a2d

Browse files
committed
Fix Opcache test fails regarding to AppVeyor image update
1 parent 33382dc commit 6043a2d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

ext/opcache/tests/php_cli_server.inc

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ function php_cli_server_start($ini = "") {
77
$php_executable = getenv('TEST_PHP_EXECUTABLE');
88
$doc_root = __DIR__;
99

10-
$descriptorspec = array(
11-
0 => STDIN,
12-
1 => STDOUT,
13-
2 => STDERR,
14-
);
15-
1610
if (substr(PHP_OS, 0, 3) == 'WIN') {
11+
$descriptorspec = array(
12+
0 => STDIN,
13+
1 => STDOUT,
14+
2 => array("pipe", "w"),
15+
);
16+
1717
$cmd = "{$php_executable} -t {$doc_root} $ini -S " . PHP_CLI_SERVER_ADDRESS;
1818
$handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true, "suppress_errors" => true));
1919
} else {
20+
$descriptorspec = array(
21+
0 => STDIN,
22+
1 => STDOUT,
23+
2 => STDERR,
24+
);
25+
2026
$cmd = "exec {$php_executable} -t {$doc_root} $ini -S " . PHP_CLI_SERVER_ADDRESS . " 2>/dev/null";
2127
$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
2228
}

0 commit comments

Comments
 (0)