mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix potentially erroneous response size in debug output #2546
This commit is contained in:
parent
24e90e43fa
commit
cac3ec1165
1 changed files with 4 additions and 2 deletions
|
|
@ -9,7 +9,6 @@ class DisplayHandler extends Handler
|
|||
{
|
||||
public static $response_size = 0;
|
||||
public static $debug_printed = 0;
|
||||
public $content_size = 0;
|
||||
public $handler = NULL;
|
||||
|
||||
/**
|
||||
|
|
@ -140,12 +139,15 @@ class DisplayHandler extends Handler
|
|||
$buff = ltrim($buff, "\n\r\t\v\x00\x20\u{FEFF}");
|
||||
|
||||
// call a trigger after display
|
||||
self::$response_size = $this->content_size = strlen($output);
|
||||
ModuleHandler::triggerCall('display', 'after', $output);
|
||||
|
||||
// Measure the response size.
|
||||
self::$response_size = strlen((string)$output);
|
||||
|
||||
// Output buffered content only if the current page is HTML.
|
||||
if ($handler instanceof HTMLDisplayHandler)
|
||||
{
|
||||
self::$response_size += strlen($buff);
|
||||
echo $buff;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue