diff options
author | Wez Furlong <wez@php.net> | 2002-03-15 21:03:08 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2002-03-15 21:03:08 +0000 |
commit | 0f65280cb5118d8c1a85db6626f7be365f3d1b26 (patch) | |
tree | 931b09acc5041eb771017e3ebf9ecb9aa833d722 /ext/curl/curl.c | |
parent | 3a1ebd4f519facbd7ec769304857aad40e49cf1c (diff) | |
download | php-git-0f65280cb5118d8c1a85db6626f7be365f3d1b26.tar.gz |
New PHP streams...
Diffstat (limited to 'ext/curl/curl.c')
-rw-r--r-- | ext/curl/curl.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/curl/curl.c b/ext/curl/curl.c index 41f71b0a3a..2413d8b4e7 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -699,7 +699,14 @@ PHP_FUNCTION(curl_setopt) case CURLOPT_WRITEHEADER: case CURLOPT_STDERR: { FILE *fp = NULL; - ZEND_FETCH_RESOURCE(fp, FILE *, zvalue, -1, "File-Handle", php_file_le_fopen()); + int type; + void * what; + + what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream()); + ZEND_VERIFY_RESOURCE(what); + + if (!php_stream_cast((php_stream*)what, PHP_STREAM_AS_STDIO, (void*)&fp, REPORT_ERRORS)) + RETURN_FALSE; if (!fp) { RETURN_FALSE; } |