From ad521b6503877cc6dc657d5bce6894879f7a6866 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Mon, 29 Apr 2024 12:20:21 +0200 Subject: [PATCH] bar: errors panel => warnings --- .../Bar/panels/{errors.panel.phtml => warnings.panel.phtml} | 0 src/Tracy/Bar/panels/{errors.tab.phtml => warnings.tab.phtml} | 4 ++-- src/Tracy/Debugger/Debugger.php | 2 +- src/Tracy/Debugger/DevelopmentStrategy.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/Tracy/Bar/panels/{errors.panel.phtml => warnings.panel.phtml} (100%) rename src/Tracy/Bar/panels/{errors.tab.phtml => warnings.tab.phtml} (92%) diff --git a/src/Tracy/Bar/panels/errors.panel.phtml b/src/Tracy/Bar/panels/warnings.panel.phtml similarity index 100% rename from src/Tracy/Bar/panels/errors.panel.phtml rename to src/Tracy/Bar/panels/warnings.panel.phtml diff --git a/src/Tracy/Bar/panels/errors.tab.phtml b/src/Tracy/Bar/panels/warnings.tab.phtml similarity index 92% rename from src/Tracy/Bar/panels/errors.tab.phtml rename to src/Tracy/Bar/panels/warnings.tab.phtml index 70b0a53ed..baef3e1cf 100644 --- a/src/Tracy/Bar/panels/errors.tab.phtml +++ b/src/Tracy/Bar/panels/warnings.tab.phtml @@ -10,7 +10,7 @@ if (empty($data)) { } ?> - + 1 ? ' warnings' : ' warning' ?> diff --git a/src/Tracy/Debugger/Debugger.php b/src/Tracy/Debugger/Debugger.php index 2af031e6e..c6591361e 100644 --- a/src/Tracy/Debugger/Debugger.php +++ b/src/Tracy/Debugger/Debugger.php @@ -408,7 +408,7 @@ public static function getBar(): Bar self::$bar = new Bar; self::$bar->addPanel($info = new DefaultBarPanel('info'), 'Tracy:info'); $info->cpuUsage = self::$cpuUsage; - self::$bar->addPanel(new DefaultBarPanel('errors'), 'Tracy:errors'); // filled by errorHandler() + self::$bar->addPanel(new DefaultBarPanel('warnings'), 'Tracy:warnings'); // filled by errorHandler() } return self::$bar; diff --git a/src/Tracy/Debugger/DevelopmentStrategy.php b/src/Tracy/Debugger/DevelopmentStrategy.php index e53cb791d..ef53aef07 100644 --- a/src/Tracy/Debugger/DevelopmentStrategy.php +++ b/src/Tracy/Debugger/DevelopmentStrategy.php @@ -90,7 +90,7 @@ public function handleError( } $message = Helpers::errorTypeToString($severity) . ': ' . Helpers::improveError($message); - $count = &$this->bar->getPanel('Tracy:errors')->data["$file|$line|$message"]; + $count = &$this->bar->getPanel('Tracy:warnings')->data["$file|$line|$message"]; if (!$count++ && !Helpers::isHtmlMode() && !Helpers::isAjax()) { echo "\n$message in $file on line $line\n";