]> granicus.if.org Git - php/commitdiff
Merge branch 'pull-request/1864'
authorStanislav Malyshev <stas@php.net>
Mon, 5 Sep 2016 07:51:01 +0000 (00:51 -0700)
committerStanislav Malyshev <stas@php.net>
Mon, 5 Sep 2016 07:51:01 +0000 (00:51 -0700)
* pull-request/1864:
  Tiny tweak for `$header` initialization, it should always be an array
  Minor tweaks

1  2 
run-tests.php

diff --cc run-tests.php
index 80757edd9085bf765bb9a48c25c172679ce16a29,24e127eec4cc6f965a069d8a66a0fd19923eb247..7da6df2f17c7d487d0f87a1af5f2a53510c74873
@@@ -269,7 -269,7 +269,7 @@@ More .INIs  : " , (function_exists(\'ph
        @unlink($info_file);
  
        // load list of enabled extensions
-       save_text($info_file, '<?php echo str_replace("Zend OPcache", "opcache", join(",", get_loaded_extensions())); ?>');
 -      save_text($info_file, '<?php echo implode(",", get_loaded_extensions()); ?>');
++      save_text($info_file, '<?php echo str_replace("Zend OPcache", "opcache", implode(",", get_loaded_extensions())); ?>');
        $exts_to_test = explode(',',`$php $pass_options $info_params $no_file_cache "$info_file"`);
        // check for extensions that need special handling and regenerate
        $info_params_ex = array(
@@@ -1507,14 -1500,10 +1501,14 @@@ TEST $fil
        if (array_key_exists('EXTENSIONS', $section_text)) {
                $ext_dir=`$php -r 'echo ini_get("extension_dir");'`;
                $extensions = preg_split("/[\n\r]+/", trim($section_text['EXTENSIONS']));
-               $loaded = explode(",", `$php -n -r 'echo join(",", get_loaded_extensions());'`);
+               $loaded = explode(",", `$php -n -r 'echo implode(",", get_loaded_extensions());'`);
                foreach ($extensions as $req_ext) {
                        if (!in_array($req_ext, $loaded)) {
 -                              $ini_settings['extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $req_ext . '.' . PHP_SHLIB_SUFFIX;
 +                              if ($req_ext == 'opcache') {
 +                                      $ini_settings['zend_extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $req_ext . '.' . PHP_SHLIB_SUFFIX;
 +                              } else {
 +                                      $ini_settings['extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $req_ext . '.' . PHP_SHLIB_SUFFIX;
 +                              }
                        }
                }
        }
@@@ -1915,12 -1900,11 +1905,11 @@@ COMMAND $cm
        $output = preg_replace("/\r\n/", "\n", trim($out));
  
        /* when using CGI, strip the headers from the output */
-       $headers = "";
+       $headers = array();
  
 -      if (isset($old_php) && preg_match("/^(.*?)\r?\n\r?\n(.*)/s", $out, $match)) {
 +      if (!empty($uses_cgi) && preg_match("/^(.*?)\r?\n\r?\n(.*)/s", $out, $match)) {
                $output = trim($match[2]);
                $rh = preg_split("/[\n\r]+/", $match[1]);
-               $headers = array();
  
                foreach ($rh as $line) {
                        if (strpos($line, ':') !== false) {