From 5274f306e3d847acf3161a547e77b817274b6fc0 Mon Sep 17 00:00:00 2001 From: Anonymous Contributor Date: Sat, 9 Sep 2023 06:29:52 +0200 Subject: [PATCH] Make sure argument of Util::fillString is string --- app/util/Util.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/util/Util.php b/app/util/Util.php index 9e46c3e..13b1983 100644 --- a/app/util/Util.php +++ b/app/util/Util.php @@ -9,6 +9,10 @@ class Util { public static function fillString($string, $targetlength) { + if (gettype($string) != 'string') { + $string = strval($string); + } + while(strlen($string) < $targetlength) { $string = "0".$string;