Skip to content

Commit a0c93bf

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #78090: bug45161.phpt takes forever to finish
2 parents 3fb41c2 + 079905a commit a0c93bf

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ PHP NEWS
6565
. Fixed bug #78902 (Memory leak when using stream_filter_append). (liudaixiao)
6666
. Fixed bug #78969 (PASSWORD_DEFAULT should match PASSWORD_BCRYPT instead of being null). (kocsismate)
6767

68+
- Testing:
69+
. Fixed bug #78090 (bug45161.phpt takes forever to finish). (cmb)
70+
6871
- XSL:
6972
. Fixed bug #70078 (XSL callbacks with nodes as parameter leak memory). (cmb)
7073

ext/curl/tests/bug45161.phpt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@
22
Bug #45161 (Reusing a curl handle leaks memory)
33
--SKIPIF--
44
<?php
5-
if (substr(PHP_OS, 0, 3) == 'WIN') {
6-
exit("skip not for Windows");
7-
}
8-
if (!extension_loaded("curl")) {
9-
exit("skip curl extension not loaded");
10-
}
5+
include 'skipif.inc';
116
$curl_version = curl_version();
127
if ($curl_version['version_number'] < 0x071100) {
138
exit("skip: test works only with curl >= 7.17.0");
149
}
1510
?>
1611
--FILE--
1712
<?php
13+
include 'server.inc';
14+
$host = curl_cli_server_start();
1815

1916
// Fill memory for test
2017
$ch = curl_init();
21-
$fp = fopen('/dev/null', 'w');
18+
$fp = fopen(PHP_OS_FAMILY === 'Windows' ? 'nul' : '/dev/null', 'w');
2219

2320
/*
2421
$i = $start = $end = 100000.00;
@@ -32,7 +29,7 @@ for ($i = 0; $i < 100; $i++) {
3229
// Start actual test
3330
$start = memory_get_usage() + 1024;
3431
for($i = 0; $i < 1024; $i++) {
35-
curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1:9/');
32+
curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc");
3633
curl_setopt($ch, CURLOPT_FILE, $fp);
3734
curl_exec($ch);
3835
}

ext/curl/tests/bug46739.phpt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
Bug #46739 (array returned by curl_getinfo should contain content_type key)
33
--SKIPIF--
44
<?php
5-
if (!extension_loaded("curl")) {
6-
exit("skip curl extension not loaded");
7-
}
5+
include 'skipif.inc';
86
?>
97
--FILE--
108
<?php
11-
$ch = curl_init('http://127.0.0.1:9/');
9+
include 'server.inc';
10+
$host = curl_cli_server_start();
11+
$ch = curl_init("{$host}/get.inc");
12+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
1213

1314
curl_exec($ch);
1415
$info = curl_getinfo($ch);

0 commit comments

Comments
 (0)