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 .= "
"
+ . ""
+ . "
" . $title . "
"
+ . "
"
. "- File: " . $error["file"] . " (Line " . $error["line"] . ")
"
. "- Message: " . $this->cleanMessage($error) . "
"
. "- FacturaScripts: " . PluginManager::CORE_VERSION . "
"
. "- PHP: " . PHP_VERSION . "
"
. "
"
. "
"
. "
"
. ""
. "";
-
- return $html;
}
}
diff --git a/Core/Controller/AdminPlugins.php b/Core/Controller/AdminPlugins.php
index bbe2b3a831..b0cd626e6b 100644
--- a/Core/Controller/AdminPlugins.php
+++ b/Core/Controller/AdminPlugins.php
@@ -41,9 +41,6 @@ class AdminPlugins extends Base\Controller
*/
public $pluginManager;
- /**
- * @return array
- */
public function getAllPlugins(): array
{
$downloadTools = new Base\DownloadTools();
@@ -79,12 +76,7 @@ public function getMaxFileUpload()
return UploadedFile::getMaxFilesize() / 1024 / 1024;
}
- /**
- * Returns basic page attributes
- *
- * @return array
- */
- public function getPageData()
+ public function getPageData(): array
{
$data = parent::getPageData();
$data['menu'] = 'admin';