mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
MFB: Return empty string when recv() does not fetch any data
This commit is contained in:
parent
e26a3a8ed3
commit
59e6e127d2
@ -1046,6 +1046,9 @@ PHP_FUNCTION(socket_read)
|
||||
|
||||
efree(tmpbuf);
|
||||
RETURN_FALSE;
|
||||
} else if (!retval) {
|
||||
efree(tmpbuf);
|
||||
RETURN_EMPTY_STRING();
|
||||
}
|
||||
|
||||
tmpbuf = erealloc(tmpbuf, retval + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user