From 4b674b9c492470c4732ef6d1656392fef617d028 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 21 Mar 2024 09:04:59 +0100 Subject: [PATCH] ProblemsBadge: Don't return a string where only integers are expected fixes #948 --- library/Icingadb/Web/Navigation/Renderer/ProblemsBadge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icingadb/Web/Navigation/Renderer/ProblemsBadge.php b/library/Icingadb/Web/Navigation/Renderer/ProblemsBadge.php index 658fa1c15..5e0f55576 100644 --- a/library/Icingadb/Web/Navigation/Renderer/ProblemsBadge.php +++ b/library/Icingadb/Web/Navigation/Renderer/ProblemsBadge.php @@ -52,7 +52,7 @@ public function getProblemsCount() return $this->count; } - $this->count = $this->round($count); + $this->count = $count; $this->setState(static::STATE_CRITICAL); } @@ -146,7 +146,7 @@ protected function createBadge() $count = $this->getProblemsCount(); if ($count) { - return (new StateBadge($count, $this->getState())) + return (new StateBadge($this->round($count), $this->getState())) ->addAttributes(['class' => 'badge', 'title' => $this->getTitle()]); }