From d774911853f3afc10bd880a3693ad73ecbd21302 Mon Sep 17 00:00:00 2001 From: Artem Kupriyanov Date: Fri, 27 Nov 2020 11:47:53 +0300 Subject: [PATCH] Search for multiple products --- src/AmoCRM/Filters/CatalogElementsFilter.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/AmoCRM/Filters/CatalogElementsFilter.php b/src/AmoCRM/Filters/CatalogElementsFilter.php index e4dcf0c2..ab23291a 100755 --- a/src/AmoCRM/Filters/CatalogElementsFilter.php +++ b/src/AmoCRM/Filters/CatalogElementsFilter.php @@ -18,7 +18,7 @@ class CatalogElementsFilter extends BaseEntityFilter implements HasPagesInterfac private $ids = null; /** - * @var string|null + * @var string|array|null */ private $query = null; @@ -42,21 +42,21 @@ public function setIds(array $ids): self } /** - * @return string|null + * @return string|array|null */ - public function getQuery(): ?string + public function getQuery() { return $this->query; } /** - * @param string|null $query + * @param string|array|null $query * @return CatalogElementsFilter */ - public function setQuery(?string $query): self + public function setQuery($query): self { - if (!empty($query)) { - $this->query = (string)$query; + if (!empty($query) && (is_array($query) || is_string($query))) { + $this->query = $query; } return $this;