From 78bd2bc232efbc741814cc558f432dfc9a173c31 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Gomez Date: Fri, 20 May 2022 17:52:39 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20bot=C3=B3n=20para=20desactivar?= =?UTF-8?q?=20plugin=20al=20manejador=20de=20errores.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/Base/Debug/ProductionErrorHandler.php | 29 ++++++++++------------ Core/Controller/AdminPlugins.php | 10 +------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/Core/Base/Debug/ProductionErrorHandler.php b/Core/Base/Debug/ProductionErrorHandler.php index 917365ff21..c3551c1be2 100644 --- a/Core/Base/Debug/ProductionErrorHandler.php +++ b/Core/Base/Debug/ProductionErrorHandler.php @@ -78,45 +78,42 @@ private function getPluginName($error): string */ private function render($error): string { - $title = "FATAL ERROR #" . $error["type"]; + $pluginName = $this->getPluginName($error); + $title = empty($pluginName) ? "FATAL ERROR #" . $error["type"] : 'Plugin ' . $pluginName . ': FATAL ERROR #' . $error["type"]; // calculamos un hash para el error, de forma que en la web podamos dar respuesta automáticamente $code = $error["type"] . substr($error["file"], strlen(FS_FOLDER)) . $error["line"] . $this->cleanMessage($error); $hash = sha1($code); - $html = "" + $btn2 = empty($pluginName) ? '' : + ' DISABLE / DESACTIVAR PLUGIN'; + + return "" . "" . "" . $title . "" . "" . "" . "" - . "
"; - - $pluginName = $this->getPluginName($error); - if ($pluginName !== '') { - $html .= "

Plugin " . $pluginName . ": " . $title . "

"; - } else { - $html .= "

" . $title . "

"; - } - - $html .= "