From 00914ef324b012064bf34318586627f15b5ddc2d Mon Sep 17 00:00:00 2001 From: grandeljay Date: Thu, 23 Jun 2022 20:32:53 +0200 Subject: [PATCH] Fix invalid return type --- src/classes/sanitiser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/sanitiser.php b/src/classes/sanitiser.php index 2e088c1e..b53b62b3 100644 --- a/src/classes/sanitiser.php +++ b/src/classes/sanitiser.php @@ -6,7 +6,7 @@ class Sanitiser { public static function getNumber(mixed $valueToSanitise): float { - return preg_replace('/[^0-9\.]+/', '', $valueToSanitise); + return floatval(preg_replace('/[^0-9\.]+/', '', $valueToSanitise)); } public static function getPage(mixed $valueToSanitise): string