Skip to content

Commit 6c4f1e4

Browse files
authored
Ensure dates are not turned to arrays
Resolves #3156
1 parent 78ecbc4 commit 6c4f1e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Utilities/Helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public static function convertToArray(mixed $row, array $filters = []): array
203203

204204
$data = $row instanceof Arrayable ? $row->toArray() : (array) $row;
205205
foreach ($data as &$value) {
206-
if (is_object($value) || is_array($value)) {
206+
if ((is_object($value) && !$value instanceof DateTime) || is_array($value)) {
207207
$value = self::convertToArray($value);
208208
}
209209

0 commit comments

Comments
 (0)