mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
MFB: Return empty string when recv() does not fetch any data
This commit is contained in:
parent
a545c29a5b
commit
f902e8d250
1 changed files with 3 additions and 0 deletions
|
@ -1036,6 +1036,9 @@ PHP_FUNCTION(socket_read)
|
|||
|
||||
efree(tmpbuf);
|
||||
RETURN_FALSE;
|
||||
} else if (!retval) {
|
||||
efree(tmpbuf);
|
||||
RETURN_EMPTY_STRING();
|
||||
}
|
||||
|
||||
tmpbuf = erealloc(tmpbuf, retval + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue