php-src/ext/standard/tests/file/bug53241.phpt
Gustavo André dos Santos Lopes 0a35133524 - Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
with streams opened with, inter alia, the 'xb' mode).
2010-11-05 01:29:08 +00:00

19 lines
508 B
PHP

--TEST--
Bug #53241 (stream casting that relies on fdopen/fopencookie fails with 'xb' mode)
--SKIPIF--
<?php
/* unfortunately no standard function does a cast to FILE*, so we need
* curl to test this */
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
--FILE--
<?php
$fn = __DIR__ . "/test.tmp";
@unlink($fn);
$fh = fopen($fn, 'xb');
$ch = curl_init('http://www.yahoo.com/');
var_dump(curl_setopt($ch, CURLOPT_FILE, $fh));
echo "Done.\n";
--EXPECT--
bool(true)
Done.