zval *zfd = NULL;
zval *zlength = NULL;
zval *retval_ptr;
- int length;
int error;
zend_fcall_info fci;
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC);
if (error == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION");
- length = -1;
} else {
- if(Z_TYPE_P(retval_ptr) == IS_STRING) {
+ if (Z_TYPE_P(retval_ptr) == IS_STRING) {
memcpy(data, Z_STRVAL_P(retval_ptr), size * nmemb);
length = Z_STRLEN_P(retval_ptr);
- } else {
- data = strdup("");
}
}