From: Stanislav Malyshev Date: Mon, 5 Sep 2016 07:51:01 +0000 (-0700) Subject: Merge branch 'pull-request/1864' X-Git-Tag: php-7.2.0alpha1~1338 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9470cdd4c3780c78c00b50f0e7aed2633d556f5d;p=php Merge branch 'pull-request/1864' * pull-request/1864: Tiny tweak for `$header` initialization, it should always be an array Minor tweaks --- 9470cdd4c3780c78c00b50f0e7aed2633d556f5d diff --cc run-tests.php index 80757edd90,24e127eec4..7da6df2f17 --- a/run-tests.php +++ b/run-tests.php @@@ -269,7 -269,7 +269,7 @@@ More .INIs : " , (function_exists(\'ph @unlink($info_file); // load list of enabled extensions - save_text($info_file, ''); - save_text($info_file, ''); ++ save_text($info_file, ''); $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) {