Skip to content

Commit 843e492

Browse files
committed
Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS
1 parent ec3d864 commit 843e492

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)