From a5bf342fa9f15b16134b2637980c450a2fdf5133 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Mon, 4 Nov 2024 07:11:11 -0600 Subject: [PATCH] Fix MapDataController::linkUseColour return Not always returning a string. --- app/Http/Controllers/Maps/MapDataController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Maps/MapDataController.php b/app/Http/Controllers/Maps/MapDataController.php index a1600a0e9c1d..bc9c9517c84c 100644 --- a/app/Http/Controllers/Maps/MapDataController.php +++ b/app/Http/Controllers/Maps/MapDataController.php @@ -377,13 +377,13 @@ protected function linkUseColour(float $link_pct): string { $link_pct = round(2 * $link_pct, -1) / 2; if ($link_pct > 100) { - $link_used = 100; + $link_pct = 100; } if (is_nan($link_pct)) { - $link_used = 0; + $link_pct = 0; } - return Config::get("network_map_legend.$link_pct"); + return Config::get("network_map_legend.$link_pct", '#000000'); } protected function nodeDisabledStyle(): array