Fix output being echoed if an error occurs while rendering template

This commit is contained in:
2024-08-04 21:48:42 +10:00
parent 5a4f420b88
commit e7574e7ef8

View File

@@ -6,7 +6,7 @@ class SPLPageRenderer {
set_error_handler(function($errno, $errstr, $errfile, $errline) { set_error_handler(function($errno, $errstr, $errfile, $errline) {
// Clear any output if an error occurred // Clear any output if an error occurred
ob_get_clean(); ob_clean();
error_log("Error: $errstr in $errfile on line $errline"); error_log("Error: $errstr in $errfile on line $errline");
return true; // Prevent default error handling return true; // Prevent default error handling
}); });