xref: /php-src/ext/curl/tests/bug67643.phpt (revision 74859783)
1--TEST--
2Bug #67643 (curl_multi_getcontent returns '' when RETURNTRANSFER isn't set)
3--EXTENSIONS--
4curl
5--FILE--
6<?php
7    $ch = curl_init();
8    curl_setopt($ch, CURLOPT_URL, 'file://'. __DIR__ . DIRECTORY_SEPARATOR .'curl_testdata1.txt');
9    curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
10
11    $mh = curl_multi_init();
12    curl_multi_add_handle($mh, $ch);
13
14    $running = 0;
15    do {
16        curl_multi_exec($mh, $running);
17    } while($running > 0);
18
19    $results = curl_multi_getcontent($ch);
20
21    curl_multi_remove_handle($mh, $ch);
22    curl_multi_close($mh);
23
24    var_dump($results);
25?>
26--EXPECT--
27CURL1
28NULL
29