This commit is contained in:
Jordan
2026-04-15 19:58:40 +01:00
parent 4f78c9276e
commit f64a790b9b
3 changed files with 4 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ if (!@$apartado) {
include "footer.php"; include "footer.php";
$resultInclude = ob_get_clean(); $resultInclude = ob_get_clean();
if (detect_error_on_code($resultInclude) === false){ if (detect_error_on_code($resultInclude)){
echo $resultInclude; echo $resultInclude;
}else{ }else{
echo error_html($resultInclude,true); echo error_html($resultInclude,true);
@@ -47,7 +47,7 @@ if (!@$apartado) {
$resultInclude = ob_get_clean(); $resultInclude = ob_get_clean();
if (detect_error_on_code($resultInclude) === false){ if (detect_error_on_code($resultInclude)){
echo $resultInclude; echo $resultInclude;
}else{ }else{
echo error_html($resultInclude); echo error_html($resultInclude);

View File

@@ -300,7 +300,7 @@ function muestra_breadcrumb($record = array(), $previousLinks = array(),$class =
function detect_error_on_code($code) { function detect_error_on_code($code) {
preg_match_all('/\b(Fatal error|Parse error|Warning|Notice):.*?\b/i', $code, $matches); preg_match_all('/\b(Fatal error|Parse error|Warning|Notice):.*?\b/i', $code, $matches);
return @$matches[0]; return !empty($matches[0]) ? $matches[0] : array();
} }
function error_html($error, $a404 = false) { function error_html($error, $a404 = false) {
$result = ''; $result = '';

View File

@@ -392,7 +392,7 @@ addPlugins("pre_render",$resultInclude);
if (class_exists("CocoDB") && isset(CocoDB::$force_redis_html) && CocoDB::$force_redis_html && @$hash){ if (class_exists("CocoDB") && isset(CocoDB::$force_redis_html) && CocoDB::$force_redis_html && @$hash){
CocoDB::cacheSet(@$hash,$resultInclude); CocoDB::cacheSet(@$hash,$resultInclude);
} }
if (detect_error_on_code($resultInclude) === false){ if (detect_error_on_code($resultInclude) ){
echo $resultInclude; echo $resultInclude;
}else{ }else{
echo error_html($resultInclude); echo error_html($resultInclude);