File tree Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ PHP NEWS
45
45
- Standard:
46
46
. Fixed bug #78902 (Memory leak when using stream_filter_append). (liudaixiao)
47
47
48
+ - Testing:
49
+ . Fixed bug #78090 (bug45161.phpt takes forever to finish). (cmb)
50
+
48
51
- XSL:
49
52
. Fixed bug #70078 (XSL callbacks with nodes as parameter leak memory). (cmb)
50
53
Original file line number Diff line number Diff line change 2
2
Bug #45161 (Reusing a curl handle leaks memory)
3
3
--SKIPIF--
4
4
<?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 ' ;
11
6
$ curl_version = curl_version ();
12
7
if ($ curl_version ['version_number ' ] < 0x071100 ) {
13
8
exit ("skip: test works only with curl >= 7.17.0 " );
14
9
}
15
10
?>
16
11
--FILE--
17
12
<?php
13
+ include 'server.inc ' ;
14
+ $ host = curl_cli_server_start ();
18
15
19
16
// Fill memory for test
20
17
$ ch = curl_init ();
21
- $ fp = fopen ('/dev/null ' , 'w ' );
18
+ $ fp = fopen (PHP_OS_FAMILY === ' Windows ' ? ' nul ' : '/dev/null ' , 'w ' );
22
19
23
20
/*
24
21
$i = $start = $end = 100000.00;
@@ -32,7 +29,7 @@ for ($i = 0; $i < 100; $i++) {
32
29
// Start actual test
33
30
$ start = memory_get_usage () + 1024 ;
34
31
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 " );
36
33
curl_setopt ($ ch , CURLOPT_FILE , $ fp );
37
34
curl_exec ($ ch );
38
35
}
Original file line number Diff line number Diff line change 2
2
Bug #46739 (array returned by curl_getinfo should contain content_type key)
3
3
--SKIPIF--
4
4
<?php
5
- if (!extension_loaded ("curl " )) {
6
- exit ("skip curl extension not loaded " );
7
- }
5
+ include 'skipif.inc ' ;
8
6
?>
9
7
--FILE--
10
8
<?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 );
12
13
13
14
curl_exec ($ ch );
14
15
$ info = curl_getinfo ($ ch );
You can’t perform that action at this time.
0 commit comments