mirror of
https://github.com/php/php-src.git
synced 2025-01-11 21:43:52 +08:00
- make getservbyname on windows behaves like *nux when proto is an empty string
This commit is contained in:
parent
6a7d96eef9
commit
f386e268cd
@ -5582,6 +5582,15 @@ PHP_FUNCTION(getservbyname)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* empty string behaves like NULL on windows implementation of
|
||||
getservbyname. Let be portable instead. */
|
||||
#ifdef PHP_WIN32
|
||||
if (proto_len == 0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
serv = getservbyname(name, proto);
|
||||
|
||||
if (serv == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user