Skip to content

Commit ac1fd76

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS
2 parents 0f55138 + 843e492 commit ac1fd76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/streamsfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ PHP_FUNCTION(stream_socket_get_name)
314314
RETURN_FALSE;
315315
}
316316

317-
if (!ZSTR_LEN(name)) {
317+
if ((ZSTR_LEN(name) == 0) || (ZSTR_VAL(name)[0] == 0)) {
318318
zend_string_release(name);
319319
RETURN_FALSE;
320320
}

0 commit comments

Comments
 (0)