MFB: Return empty string when recv() does not fetch any data

This commit is contained in:
Ilia Alshanetsky 2009-02-03 19:23:12 +00:00
parent a545c29a5b
commit f902e8d250

View file

@ -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);