From: Marcus Boerger Date: Sat, 30 Aug 2008 11:24:56 +0000 (+0000) Subject: - Environment handling seems to have changed to respect unicode... so we X-Git-Tag: BEFORE_HEAD_NS_CHANGE~519 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5bbb0803f89d68e0ff1dd5dbd017bc8bfb649a5;p=php - 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? --- diff --git a/run-tests.php b/run-tests.php index 92e2180929..9b9b2f9157 100755 --- a/run-tests.php +++ b/run-tests.php @@ -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;