Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
datetime interface
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy-j committed Feb 11, 2017
1 parent 3e3d1d4 commit cb967ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/Spiral/Database/Entities/PDODriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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())
Expand Down

0 comments on commit cb967ec

Please sign in to comment.