Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS

This commit is contained in:
Sara Golemon 2017-10-07 10:08:34 -04:00
parent ec3d864784
commit 843e492c68
No known key found for this signature in database
GPG Key ID: DBDB397470D12172

View File

@ -314,7 +314,7 @@ PHP_FUNCTION(stream_socket_get_name)
RETURN_FALSE;
}
if (!ZSTR_LEN(name)) {
if ((ZSTR_LEN(name) == 0) || (ZSTR_VAL(name)[0] == 0)) {
zend_string_release(name);
RETURN_FALSE;
}