DbQuery: Accept any type in method `valueToTimestamp()`

This commit is contained in:
Johannes Meyer 2022-06-30 08:37:14 +02:00
parent 2a24f69fd8
commit 95ea071a89
1 changed files with 8 additions and 8 deletions

View File

@ -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);
}
/**