diff --git a/apartados.php b/apartados.php index b98ec3b..495b724 100755 --- a/apartados.php +++ b/apartados.php @@ -25,7 +25,7 @@ if (!@$apartado) { include "footer.php"; $resultInclude = ob_get_clean(); - if (detect_error_on_code($resultInclude) === false){ + if (detect_error_on_code($resultInclude)){ echo $resultInclude; }else{ echo error_html($resultInclude,true); @@ -47,7 +47,7 @@ if (!@$apartado) { $resultInclude = ob_get_clean(); - if (detect_error_on_code($resultInclude) === false){ + if (detect_error_on_code($resultInclude)){ echo $resultInclude; }else{ echo error_html($resultInclude); diff --git a/funciones.php b/funciones.php index ed882b2..be87111 100755 --- a/funciones.php +++ b/funciones.php @@ -300,7 +300,7 @@ function muestra_breadcrumb($record = array(), $previousLinks = array(),$class = function detect_error_on_code($code) { 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) { $result = ''; diff --git a/slug.php b/slug.php index 3887727..42472c9 100755 --- a/slug.php +++ b/slug.php @@ -392,7 +392,7 @@ addPlugins("pre_render",$resultInclude); if (class_exists("CocoDB") && isset(CocoDB::$force_redis_html) && CocoDB::$force_redis_html && @$hash){ CocoDB::cacheSet(@$hash,$resultInclude); } -if (detect_error_on_code($resultInclude) === false){ +if (detect_error_on_code($resultInclude) ){ echo $resultInclude; }else{ echo error_html($resultInclude);