File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2749,8 +2749,7 @@ PHP_FUNCTION(socket_export_stream)
27492749/* {{{ Gets array with contents of getaddrinfo about the given hostname. */
27502750PHP_FUNCTION (socket_addrinfo_lookup )
27512751{
2752- char * service = NULL ;
2753- size_t service_len = 0 ;
2752+ zend_string * service = NULL ;
27542753 zend_string * hostname , * key ;
27552754 zval * hint , * zhints = NULL ;
27562755
@@ -2760,7 +2759,7 @@ PHP_FUNCTION(socket_addrinfo_lookup)
27602759 ZEND_PARSE_PARAMETERS_START (1 , 3 )
27612760 Z_PARAM_STR (hostname )
27622761 Z_PARAM_OPTIONAL
2763- Z_PARAM_STRING_OR_NULL (service , service_len )
2762+ Z_PARAM_STR_OR_NULL (service )
27642763 Z_PARAM_ARRAY (zhints )
27652764 ZEND_PARSE_PARAMETERS_END ();
27662765
@@ -2849,7 +2848,7 @@ PHP_FUNCTION(socket_addrinfo_lookup)
28492848 } ZEND_HASH_FOREACH_END ();
28502849 }
28512850
2852- if (getaddrinfo (ZSTR_VAL (hostname ), service , & hints , & result ) != 0 ) {
2851+ if (getaddrinfo (ZSTR_VAL (hostname ), service ? ZSTR_VAL ( service ) : NULL , & hints , & result ) != 0 ) {
28532852 RETURN_FALSE ;
28542853 }
28552854
You can’t perform that action at this time.
0 commit comments