1--TEST-- 2Bug #48203 (Crash when CURLOPT_STDERR is set to regular file) 3--SKIPIF-- 4<?php include 'skipif.inc'; ?> 5--FILE-- 6<?php 7include 'server.inc'; 8$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w'); 9 10$ch = curl_init(); 11 12curl_setopt($ch, CURLOPT_VERBOSE, 1); 13curl_setopt($ch, CURLOPT_STDERR, $fp); 14curl_setopt($ch, CURLOPT_URL, curl_cli_server_start()); 15 16fclose($fp); // <-- premature close of $fp caused a crash! 17 18curl_exec($ch); 19curl_close($ch); 20 21echo "Ok\n"; 22 23?> 24--CLEAN-- 25<?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?> 26--EXPECTF-- 27Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203.php on line %d 28%A 29Ok 30