diff --git a/source/Spiral/Database/Entities/PDODriver.php b/source/Spiral/Database/Entities/PDODriver.php index 01127ea3..f1cc5b1e 100644 --- a/source/Spiral/Database/Entities/PDODriver.php +++ b/source/Spiral/Database/Entities/PDODriver.php @@ -430,7 +430,7 @@ public function flattenParameters(array $parameters): array * @var ParameterInterface $parameter [] */ foreach ($nestedParameters as &$nestedParameter) { - if ($nestedParameter->getValue() instanceof \DateTime) { + if ($nestedParameter->getValue() instanceof \DateTimeInterface) { //Original parameter must not be altered $nestedParameter = $nestedParameter->withValue( @@ -445,7 +445,7 @@ public function flattenParameters(array $parameters): array $flatten = array_merge($flatten, $nestedParameters); } else { - if ($parameter->getValue() instanceof \DateTime) { + if ($parameter->getValue() instanceof \DateTimeInterface) { //Original parameter must not be altered $parameter = $parameter->withValue( $this->normalizeTimestamp($parameter->getValue())