mirror of
https://github.com/php/php-src.git
synced 2025-01-22 11:44:09 +08:00
- Environment handling seems to have changed to respect unicode... so we
have to convert everything to binary before passing it along. A bunch of tests suffer from this change in behavior as well. Can anyone explain to me what was changed and why?
This commit is contained in:
parent
d839777672
commit
c5bbb0803f
@ -559,6 +559,7 @@ if (isset($argc) && $argc > 1) {
|
||||
case 'p':
|
||||
$php = $argv[++$i];
|
||||
putenv("TEST_PHP_EXECUTABLE=$php");
|
||||
$environment['TEST_PHP_EXECUTABLE'] = $php;
|
||||
break;
|
||||
case 'q':
|
||||
putenv('NO_INTERACTION=1');
|
||||
@ -999,11 +1000,16 @@ function system_with_timeout($commandline, $env = null, $stdin = null)
|
||||
|
||||
$data = '';
|
||||
|
||||
$bin_env = array();
|
||||
foreach($env as $key => $value) {
|
||||
$bin_env[(binary)$key] = (binary)$value;
|
||||
}
|
||||
|
||||
$proc = proc_open($commandline, array(
|
||||
0 => array('pipe', 'r'),
|
||||
1 => array('pipe', 'w'),
|
||||
2 => array('pipe', 'w')
|
||||
), $pipes, null, $env, array('suppress_errors' => true, 'binary_pipes' => true));
|
||||
), $pipes, null, $bin_env, array('suppress_errors' => true, 'binary_pipes' => true));
|
||||
|
||||
if (!$proc) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user