mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
DbQuery: Accept any type in method valueToTimestamp()
This commit is contained in:
parent
2a24f69fd8
commit
95ea071a89
@ -224,17 +224,17 @@ class DbQuery extends SimpleQuery
|
||||
|
||||
protected function valueToTimestamp($value)
|
||||
{
|
||||
if (ctype_digit($value)) {
|
||||
if (is_string($value)) {
|
||||
if (ctype_digit($value)) {
|
||||
$value = (int) $value;
|
||||
} else {
|
||||
$value = strtotime($value);
|
||||
}
|
||||
} elseif (! is_int($value)) {
|
||||
$value = (int) $value;
|
||||
} elseif (is_string($value)) {
|
||||
$value = strtotime($value);
|
||||
}
|
||||
|
||||
if (is_int($value)) {
|
||||
$value = $this->timestampForSql($value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
return $this->timestampForSql($value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user