Skip to content

Commit

Permalink
Merge pull request #886 from PennyDreadfulMTG/api-fix
Browse files Browse the repository at this point in the history
Don't let our new DateTimeImmutable stuff change the API output
  • Loading branch information
bakert authored Jan 17, 2025
2 parents c676199 + 437b65c commit 2e0d7e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gatherling/api_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
function populate(array $array, object $src, array $keys): array
{
foreach ($keys as $key) {
if ($src->{$key} instanceof \DateTimeImmutable) {
$array[$key] = $src->{$key}->format('Y-m-d H:i:s');
continue;
}
$array[$key] = $src->{$key};
}

Expand Down

0 comments on commit 2e0d7e8

Please sign in to comment.