Skip to content

Commit 8888916

Browse files
committed
Fix PHP 8.1 E_DEPRECATED issue when the page has no output.
Signed-off-by: Bruno Moreira <[email protected]>
1 parent 63d0375 commit 8888916

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/core/Output.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ public function _display($output = NULL)
456456

457457
$elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end');
458458

459-
if ($this->parse_exec_vars === TRUE)
459+
if ($this->parse_exec_vars === TRUE && !empty($output))
460460
{
461461
$memory = round(memory_get_usage() / 1024 / 1024, 2).'MB';
462462
$output = str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsed, $memory), $output);

0 commit comments

Comments
 (0)