From 1bc5a5804bf9fc22e82a4eadb21a1795954f0867 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Wed, 31 May 2023 09:11:30 +0200 Subject: [PATCH] filter: check for numbers first --- lib/Thruk/Utils/Filter.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Thruk/Utils/Filter.pm b/lib/Thruk/Utils/Filter.pm index f524821934..2ac8d86086 100644 --- a/lib/Thruk/Utils/Filter.pm +++ b/lib/Thruk/Utils/Filter.pm @@ -1825,6 +1825,7 @@ returns number as used in human performance data table =cut sub format_perf_number { my($number, $unit, $always_show_unit) = @_; + return $number unless($number && $number =~ m/^[\d\.]+/mx); if($number != 0 && $unit eq "B") { my($reduced_number, $reduced_unit) = Thruk::Utils::reduce_number($number, $unit); if($always_show_unit || $reduced_unit ne $unit) {