From 4a6066706e7d97f4d47fe9196e6648e48b3e4302 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Wed, 16 Aug 2023 14:14:10 +0300 Subject: [PATCH] Making PHPStan happy --- .gitignore | 1 + filters.inc.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e92f57 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tags diff --git a/filters.inc.php b/filters.inc.php index b83739c..7227f93 100644 --- a/filters.inc.php +++ b/filters.inc.php @@ -63,9 +63,9 @@ function flt_time($val, $name, $struct, $args) if(!preg_match($reg, $val, $matches)) throw new Exception("Bad value, pattern 00:00:00"); - $h = $matches[1]; - $m = $matches[2]; - $s = $matches[3]; + $h = intval($matches[1]); + $m = intval($matches[2]); + $s = intval($matches[3]); return $h * 3600 + $m * 60 + $s; }