simplify the while statement

This commit is contained in:
FusionPBX 2023-09-27 23:30:18 -06:00 committed by GitHub
parent bf8c6f8078
commit 7ab357380b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -86,7 +86,11 @@ class event_socket {
if (array_key_exists('Content-Length', $content)) {
$str = $b->read_n($content['Content-Length']);
if ($str === false) {
while (!feof($this->fp)) {
while (true) {
if (feof($this->fp)) {
break;
}
$buffer = fgets($this->fp, 1024);
$b->append($buffer);
$str = $b->read_n($content['Content-Length']);