]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 3 Feb 2020 23:54:54 +0000 (00:54 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 3 Feb 2020 23:54:54 +0000 (00:54 +0100)
* PHP-7.4:
  Fix #78090: bug45161.phpt takes forever to finish

1  2 
ext/curl/tests/bug45161.phpt

index b93552e3ab3be2706adda010e9f7dd5174d843a0,d6d722fe281fa2c10b48eac628515f5f5150a274..5b8fe0d46c4498ebf703c05d78c7382a698dd6bd
@@@ -2,12 -2,11 +2,7 @@@
  Bug #45161 (Reusing a curl handle leaks memory)
  --SKIPIF--
  <?php
- if (substr(PHP_OS, 0, 3) == 'WIN') {
-       exit("skip not for Windows");
- }
- if (!extension_loaded("curl")) {
-       exit("skip curl extension not loaded");
- }
+ include 'skipif.inc';
 -$curl_version = curl_version();
 -if ($curl_version['version_number'] < 0x071100) {
 -      exit("skip: test works only with curl >= 7.17.0");
 -}
  ?>
  --FILE--
  <?php
@@@ -28,14 -29,14 +25,14 @@@ for ($i = 0; $i < 100; $i++) 
  // Start actual test
  $start = memory_get_usage() + 1024;
  for($i = 0; $i < 1024; $i++) {
-     curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1:9/');
 -      curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc");
 -      curl_setopt($ch, CURLOPT_FILE, $fp);
 -      curl_exec($ch);
++    curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc");
 +    curl_setopt($ch, CURLOPT_FILE, $fp);
 +    curl_exec($ch);
  }
  if ($start < memory_get_usage()) {
 -      echo 'FAIL';
 +    echo 'FAIL';
  } else {
 -      echo 'PASS';
 +    echo 'PASS';
  }
  echo "\n";
  fclose($fp);