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

This commit is contained in:
Ilia Alshanetsky 2009-02-03 19:22:55 +00:00
parent e26a3a8ed3
commit 59e6e127d2

View File

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