diff options
author | Jani Taskinen <jani@php.net> | 2009-05-26 17:19:23 +0000 |
---|---|---|
committer | Jani Taskinen <jani@php.net> | 2009-05-26 17:19:23 +0000 |
commit | 1296356489f3c5d579187b85108e34ed1f46b5be (patch) | |
tree | 81fcaf1f9e4269dc55a22ec21b573b0cc2c44a05 | |
parent | 83748ac00ddfe0f4e7200418355833cd5256a9ca (diff) | |
download | php-git-1296356489f3c5d579187b85108e34ed1f46b5be.tar.gz |
- Test for bug #48203
-rw-r--r-- | ext/curl/tests/bug48203.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/curl/tests/bug48203.phpt b/ext/curl/tests/bug48203.phpt new file mode 100644 index 0000000000..c0e5c29cbb --- /dev/null +++ b/ext/curl/tests/bug48203.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #48203 (Crash when CURLOPT_STDERR is set to regular file) +--FILE-- +<?php + +$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w'); + +$ch = curl_init(); + +curl_setopt($ch, CURLOPT_VERBOSE, 1); +curl_setopt($ch, CURLOPT_STDERR, $fp); +curl_setopt($ch, CURLOPT_URL, ""); + +fclose($fp); // <-- premature close of $fp caused a crash! + +curl_exec($ch); + +echo "Ok\n"; + +?> +--CLEAN-- +<?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?> +--EXPECT-- +Ok |