From: John Coggeshall Date: Fri, 12 Mar 2004 16:28:28 +0000 (+0000) Subject: Opps. Shouldn't look at the value, just the type X-Git-Tag: php-5.0.0RC1RC1~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c7ea2045bf127ea112950d3c96edc2f6c87e821;p=php Opps. Shouldn't look at the value, just the type --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 0ac818441e..ff250b46d6 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -501,7 +501,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION"); length = -1; } else { - if(Z_STRVAL_P(retval_ptr)) { + if(Z_TYPE_P(retval_ptr) == IS_STRING) { memcpy(data, Z_STRVAL_P(retval_ptr), size * nmemb); length = Z_STRLEN_P(retval_ptr); } else {