diff --git a/Core/CrashReport.php b/Core/CrashReport.php index a4ac817596..9143838215 100644 --- a/Core/CrashReport.php +++ b/Core/CrashReport.php @@ -25,7 +25,7 @@ public static function getErrorInfo(int $code, string $message, string $file, in { // calculamos un hash para el error, de forma que en la web podamos dar respuesta automáticamente $errorUrl = parse_url($_SERVER["REQUEST_URI"] ?? '', PHP_URL_PATH); - $errorMessage = self::cleanErrorMessage($message); + $errorMessage = self::formatErrorMessage($message); $errorFile = str_replace(FS_FOLDER, '', $file); $errorHash = md5($code . $errorFile . $line . $errorMessage); $reportUrl = 'https://facturascripts.com/errores/' . $errorHash; @@ -148,7 +148,7 @@ public static function shutdown(): void $num = 1; $trace = explode("\n", $messageParts[1]); foreach (array_reverse($trace) as $value) { - if (trim($value) === 'thrown') { + if (trim($value) === 'thrown' || substr($value, 3) === '{main}') { continue; } @@ -156,6 +156,7 @@ public static function shutdown(): void $num++; } + echo '