From 9c18ede2a5bbc78caf6b4071312a2675c17a66b8 Mon Sep 17 00:00:00 2001 From: azatyar Date: Thu, 22 Dec 2022 18:29:37 +0300 Subject: [PATCH] Update EventsFilter.php --- src/AmoCRM/Filters/EventsFilter.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/AmoCRM/Filters/EventsFilter.php b/src/AmoCRM/Filters/EventsFilter.php index 7fb4c095..7d9ade83 100755 --- a/src/AmoCRM/Filters/EventsFilter.php +++ b/src/AmoCRM/Filters/EventsFilter.php @@ -162,12 +162,7 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - //todo support for range filter - if (!is_array($createdAt)) { - $createdAt = [$createdAt]; - } - - $this->createdAt = $createdAt; + $this->createdAt = $this->parseIntOrIntRangeFilter($createdAt); return $this; } @@ -242,7 +237,7 @@ public function buildFilter(): array } if (!is_null($this->getCreatedAt())) { - $filter['filter']['created_at'] = implode(',', $this->getCreatedAt()); + $filter['filter']['created_at'] = $this->getCreatedAt(); } if (!is_null($this->getEntityIds())) {