Skip to content

Commit

Permalink
DbQuery: Return non-string args as is in valueToTimestamp()
Browse files Browse the repository at this point in the history
fixes #4182
  • Loading branch information
nilmerg committed Jun 24, 2020
1 parent 4d173e6 commit b288d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Icinga/Data/Db/DbQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ protected function escapeWildcards($value)
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);
Expand Down

0 comments on commit b288d86

Please sign in to comment.