File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2777,8 +2777,13 @@ PHP_FUNCTION(socket_addrinfo_lookup)
27772777 // Some platforms support also PF_LOCAL/AF_UNIX (e.g. FreeBSD) but the security concerns implied
27782778 // make it not worth handling it (e.g. unwarranted write permissions on the socket).
27792779 // Note existing socket_addrinfo* api already forbid such case.
2780+ #ifdef HAVE_IPV6
27802781 if (val != AF_INET && val != AF_INET6 ) {
27812782 zend_argument_value_error (3 , "\"ai_family\" key must be AF_INET or AF_INET6" );
2783+ #else
2784+ if (val != AF_INET ) {
2785+ zend_argument_value_error (3 , "\"ai_family\" key must be AF_INET" );
2786+ #endif
27822787 RETURN_THROWS ();
27832788 }
27842789 hints .ai_family = (int )val ;
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ socket_addrinfo_lookup(): Argument #3 ($hints) "ai_family" key must be of type i
110110socket_addrinfo_lookup(): Argument #3 ($hints) "ai_socktype" key must be of type int, stdClass given
111111socket_addrinfo_lookup(): Argument #3 ($hints) "ai_flags" key must be of type int, stdClass given
112112socket_addrinfo_lookup(): Argument #3 ($hints) "ai_protocol" key must be of type int, stdClass given
113- socket_addrinfo_lookup(): Argument #3 ($hints) "ai_family" key must be AF_INET or AF_INET6
113+ socket_addrinfo_lookup(): Argument #3 ($hints) "ai_family" key must be AF_INET%A
114114socket_addrinfo_lookup(): Argument #3 ($hints) "ai_socktype" key must be between 0 and %d
115115socket_addrinfo_lookup(): Argument #3 ($hints) "ai_flags" key must be between 0 and %d
116116socket_addrinfo_lookup(): Argument #3 ($hints) "ai_protocol" key must be between 0 and %d
You can’t perform that action at this time.
0 commit comments