From b288d86e916fd41e9077c344999eac31b4404955 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 18 Jun 2020 15:13:11 +0200 Subject: [PATCH] DbQuery: Return non-string args as is in `valueToTimestamp()` fixes #4182 --- library/Icinga/Data/Db/DbQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Data/Db/DbQuery.php b/library/Icinga/Data/Db/DbQuery.php index fffd7b08a..04f96ddb8 100644 --- a/library/Icinga/Data/Db/DbQuery.php +++ b/library/Icinga/Data/Db/DbQuery.php @@ -251,7 +251,7 @@ class DbQuery extends SimpleQuery protected function valueToTimestamp($value) { // We consider integers as valid timestamps. Does not work for URL params - if (ctype_digit($value)) { + if (! is_string($value) || ctype_digit($value)) { return $value; } $value = strtotime($value);