Skip to content

Commit

Permalink
Fixed a minor error with PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Jan 15, 2022
1 parent 17142ec commit 3075719
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions public_html/lib-common.php
Original file line number Diff line number Diff line change
Expand Up @@ -8226,12 +8226,16 @@ function COM_handleError($errNo, $errStr, $errFile = '', $errLine = 0, $errConte
}
; }

$output .= '<pre>';
ob_start();
if ($type == 1) {
var_dump($errContext);
// Since PHP 8.0.0, $errContext argument was dropped
if (version_compare(PHP_VERSION, '8.0.0', '<')) {
$output .= '<pre>';
ob_start();
if ($type == 1) {
var_dump($errContext);
}
$output .= htmlspecialchars(ob_get_clean()) . '</pre></body></html>';
}
$output .= htmlspecialchars(ob_get_clean()) . '</pre></body></html>';

echo $output;
}
exit;
Expand Down

0 comments on commit 3075719

Please sign in to comment.