Skip to content

Commit

Permalink
workaround php bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kurowski committed Jan 11, 2023
1 parent 1f4eabb commit 40a8488
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Request/Event/EventParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,16 @@ public function toArray(): array
}

if ($this->dateStartLessThanOrEqualTo !== null) {
$array['start__lte'] = $this->dateStartLessThanOrEqualTo;
$array['start__lte'] = (string) $this->dateStartLessThanOrEqualTo; // conversion to string has to be there because of bug in php: https://github.com/php/php-src/issues/10229
}
if ($this->dateStartGreaterThanOrEqualTo !== null) {
$array['start__gte'] = $this->dateStartGreaterThanOrEqualTo;
$array['start__gte'] = (string) $this->dateStartGreaterThanOrEqualTo; // conversion to string has to be there because of bug in php: https://github.com/php/php-src/issues/10229
}
if ($this->dateEndLessThanOrEqualTo !== null) {
$array['end__lte'] = $this->dateEndLessThanOrEqualTo;
$array['end__lte'] = (string) $this->dateEndLessThanOrEqualTo; // conversion to string has to be there because of bug in php: https://github.com/php/php-src/issues/10229
}
if ($this->dateEndGreaterThanOrEqualTo !== null) {
$array['end__gte'] = $this->dateEndGreaterThanOrEqualTo;
$array['end__gte'] = (string) $this->dateEndGreaterThanOrEqualTo; // conversion to string has to be there because of bug in php: https://github.com/php/php-src/issues/10229
}

return $array;
Expand Down

0 comments on commit 40a8488

Please sign in to comment.