@@ -149,7 +149,7 @@ void _php_curl_verify_handlers(php_curl *ch, bool reporterror) /* {{{ */
149
149
ZEND_ASSERT (ch );
150
150
151
151
if (!Z_ISUNDEF (ch -> handlers .std_err )) {
152
- stream = ( php_stream * ) zend_fetch_resource2_ex ( & ch -> handlers .std_err , NULL , php_file_le_stream (), php_file_le_pstream () );
152
+ php_stream_from_zval_no_verify ( stream , & ch -> handlers .std_err );
153
153
if (stream == NULL ) {
154
154
if (reporterror ) {
155
155
php_error_docref (NULL , E_WARNING , "CURLOPT_STDERR resource has gone away, resetting to stderr" );
@@ -161,7 +161,7 @@ void _php_curl_verify_handlers(php_curl *ch, bool reporterror) /* {{{ */
161
161
}
162
162
}
163
163
if (ch -> handlers .read && !Z_ISUNDEF (ch -> handlers .read -> stream )) {
164
- stream = ( php_stream * ) zend_fetch_resource2_ex ( & ch -> handlers .read -> stream , NULL , php_file_le_stream (), php_file_le_pstream () );
164
+ php_stream_from_zval_no_verify ( stream , & ch -> handlers .read -> stream );
165
165
if (stream == NULL ) {
166
166
if (reporterror ) {
167
167
php_error_docref (NULL , E_WARNING , "CURLOPT_INFILE resource has gone away, resetting to default" );
@@ -175,7 +175,7 @@ void _php_curl_verify_handlers(php_curl *ch, bool reporterror) /* {{{ */
175
175
}
176
176
}
177
177
if (ch -> handlers .write_header && !Z_ISUNDEF (ch -> handlers .write_header -> stream )) {
178
- stream = ( php_stream * ) zend_fetch_resource2_ex ( & ch -> handlers .write_header -> stream , NULL , php_file_le_stream (), php_file_le_pstream () );
178
+ php_stream_from_zval_no_verify ( stream , & ch -> handlers .write_header -> stream );
179
179
if (stream == NULL ) {
180
180
if (reporterror ) {
181
181
php_error_docref (NULL , E_WARNING , "CURLOPT_WRITEHEADER resource has gone away, resetting to default" );
@@ -189,7 +189,7 @@ void _php_curl_verify_handlers(php_curl *ch, bool reporterror) /* {{{ */
189
189
}
190
190
}
191
191
if (ch -> handlers .write && !Z_ISUNDEF (ch -> handlers .write -> stream )) {
192
- stream = ( php_stream * ) zend_fetch_resource2_ex ( & ch -> handlers .write -> stream , NULL , php_file_le_stream (), php_file_le_pstream () );
192
+ php_stream_from_zval_no_verify ( stream , & ch -> handlers .write -> stream );
193
193
if (stream == NULL ) {
194
194
if (reporterror ) {
195
195
php_error_docref (NULL , E_WARNING , "CURLOPT_FILE resource has gone away, resetting to default" );
@@ -2035,7 +2035,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
2035
2035
php_stream * what = NULL ;
2036
2036
2037
2037
if (Z_TYPE_P (zvalue ) != IS_NULL ) {
2038
- what = ( php_stream * ) zend_fetch_resource2_ex ( zvalue , "File-Handle" , php_file_le_stream (), php_file_le_pstream () );
2038
+ php_stream_from_zval_no_verify ( what , zvalue );
2039
2039
if (!what ) {
2040
2040
return FAILURE ;
2041
2041
}
@@ -2466,7 +2466,7 @@ PHP_FUNCTION(curl_exec)
2466
2466
2467
2467
if (!Z_ISUNDEF (ch -> handlers .std_err )) {
2468
2468
php_stream * stream ;
2469
- stream = ( php_stream * ) zend_fetch_resource2_ex ( & ch -> handlers .std_err , NULL , php_file_le_stream (), php_file_le_pstream () );
2469
+ php_stream_from_zval_no_verify ( stream , & ch -> handlers .std_err );
2470
2470
if (stream ) {
2471
2471
php_stream_flush (stream );
2472
2472
}
0 commit comments