From 60989481fff7220bb9dfc510a0ce81accbe8c73f Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 6 Jul 2019 19:01:11 +0200 Subject: [PATCH] More fixes --- src/danog/MadelineProto/Wrappers/Loop.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/danog/MadelineProto/Wrappers/Loop.php b/src/danog/MadelineProto/Wrappers/Loop.php index 5dd11649..defb2b62 100644 --- a/src/danog/MadelineProto/Wrappers/Loop.php +++ b/src/danog/MadelineProto/Wrappers/Loop.php @@ -178,12 +178,13 @@ trait Loop return; } $this->logger->logger($message); + $buffer = @ob_get_contents(); @ob_end_clean(); header('Connection: close'); ignore_user_abort(true); - ob_start(); - echo '

'.$message.'

'; - $size = ob_get_length(); + $buffer .= '

'.htmlentities($message).'

'; + echo $buffer; + $size = max(ob_get_length(), strlen($buffer)); header("Content-Length: $size"); header('Content-Type: text/html'); ob_end_flush();