From 74c3440ef95c9b2dc981ea57f63ddcf5001c51c1 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 14 Aug 2023 12:44:27 +0200 Subject: [PATCH] ProcessProblemsBadge: Fix `variable $count is probably undefined` --- .../Web/Navigation/Renderer/ProcessProblemsBadge.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/Businessprocess/Web/Navigation/Renderer/ProcessProblemsBadge.php b/library/Businessprocess/Web/Navigation/Renderer/ProcessProblemsBadge.php index a31a74b..575dc5e 100644 --- a/library/Businessprocess/Web/Navigation/Renderer/ProcessProblemsBadge.php +++ b/library/Businessprocess/Web/Navigation/Renderer/ProcessProblemsBadge.php @@ -19,12 +19,10 @@ class ProcessProblemsBadge extends BadgeNavigationItemRenderer public function getCount() { + $count = 0; if ($this->count === null) { $storage = LegacyStorage::getInstance(); - $count = 0; $bp = $storage->loadProcess($this->getBpConfigName()); - - foreach ($bp->getRootNodes() as $rootNode) { if (! $rootNode->isEmpty() && $rootNode->getState() !== $rootNode::ICINGA_PENDING