]> granicus.if.org Git - php/commitdiff
- Environment handling seems to have changed to respect unicode... so we
authorMarcus Boerger <helly@php.net>
Sat, 30 Aug 2008 11:24:56 +0000 (11:24 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 30 Aug 2008 11:24:56 +0000 (11:24 +0000)
  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?

run-tests.php

index 92e2180929b5a943ba930443593ca4aa935fcede..9b9b2f9157d7bdd185cfd3c0532bb3fd01350925 100755 (executable)
@@ -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;