From 40a848887616f637c6d81868206a2b39c59c2fed Mon Sep 17 00:00:00 2001 From: Daniel Kurowski Date: Wed, 11 Jan 2023 10:50:40 +0100 Subject: [PATCH] workaround php bug --- src/Request/Event/EventParameters.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Request/Event/EventParameters.php b/src/Request/Event/EventParameters.php index 8e3e50c..c82d7ea 100644 --- a/src/Request/Event/EventParameters.php +++ b/src/Request/Event/EventParameters.php @@ -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;