@@ -1294,20 +1294,18 @@ int make_http_soap_request(zval *this_ptr,
1294
1294
/* Decompress response */
1295
1295
content_encoding = get_http_header_value (ZSTR_VAL (http_headers ), "Content-Encoding:" );
1296
1296
if (content_encoding ) {
1297
- zval func ;
1298
1297
zval retval ;
1299
1298
zval params [1 ];
1299
+ zend_function * decompression_fn ;
1300
1300
1301
1301
/* Warning: the zlib function names are chosen in an unfortunate manner.
1302
1302
* Check zlib.c to see how a function corresponds with a particular format. */
1303
1303
if ((strcmp (content_encoding ,"gzip" ) == 0 ||
1304
1304
strcmp (content_encoding ,"x-gzip" ) == 0 ) &&
1305
- zend_hash_str_exists (EG (function_table ), "gzdecode" , sizeof ("gzdecode" )- 1 )) {
1306
- ZVAL_STRING (& func , "gzdecode" );
1305
+ (decompression_fn = zend_hash_str_find_ptr (EG (function_table ), "gzdecode" , sizeof ("gzdecode" )- 1 ))) {
1307
1306
ZVAL_STR_COPY (& params [0 ], http_body );
1308
1307
} else if (strcmp (content_encoding ,"deflate" ) == 0 &&
1309
- zend_hash_str_exists (EG (function_table ), "gzuncompress" , sizeof ("gzuncompress" )- 1 )) {
1310
- ZVAL_STRING (& func , "gzuncompress" );
1308
+ (decompression_fn = zend_hash_str_find_ptr (EG (function_table ), "gzuncompress" , sizeof ("gzuncompress" )- 1 ))) {
1311
1309
ZVAL_STR_COPY (& params [0 ], http_body );
1312
1310
} else {
1313
1311
efree (content_encoding );
@@ -1319,15 +1317,13 @@ int make_http_soap_request(zval *this_ptr,
1319
1317
add_soap_fault (this_ptr , "HTTP" , "Unknown Content-Encoding" , NULL , NULL , SOAP_GLOBAL (lang_en ));
1320
1318
return FALSE;
1321
1319
}
1322
- if ( call_user_function ( CG ( function_table ), ( zval * ) NULL , & func , & retval , 1 , params ) == SUCCESS &&
1323
- Z_TYPE (retval ) == IS_STRING ) {
1320
+ zend_call_known_function ( decompression_fn , NULL , NULL , & retval , 1 , params , NULL );
1321
+ if ( Z_TYPE (retval ) == IS_STRING ) {
1324
1322
zval_ptr_dtor (& params [0 ]);
1325
- zval_ptr_dtor (& func );
1326
1323
zend_string_release_ex (http_body , 0 );
1327
1324
ZVAL_COPY_VALUE (return_value , & retval );
1328
1325
} else {
1329
1326
zval_ptr_dtor (& params [0 ]);
1330
- zval_ptr_dtor (& func );
1331
1327
zval_ptr_dtor (& retval );
1332
1328
efree (content_encoding );
1333
1329
zend_string_release_ex (http_headers , 0 );
0 commit comments