mirror of
https://github.com/php/php-src.git
synced 2026-04-28 18:53:33 +02:00
- make getservbyname on windows behaves like *nux when proto is an empty string
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user