From a53565c8fd891536c8dff3ce12fc3a01527f1f0f Mon Sep 17 00:00:00 2001 From: Grisha Pomadchin Date: Fri, 11 Jul 2014 17:19:46 +0400 Subject: [PATCH] customers method fix --- lib/IntaroCrm/RestApi.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/IntaroCrm/RestApi.php b/lib/IntaroCrm/RestApi.php index 29a9cb6..cbfd9a5 100644 --- a/lib/IntaroCrm/RestApi.php +++ b/lib/IntaroCrm/RestApi.php @@ -174,9 +174,9 @@ class RestApi public function customers($phone = null, $email = null, $fio = null, $limit = 200, $offset = 0) { $url = $this->apiUrl.'customers'; - $this->parameters['phone'] = $phone; - $this->parameters['email'] = $email; - $this->parameters['fio'] = $fio; + if($phone) $this->parameters['phone'] = $phone; + if($email) $this->parameters['email'] = $email; + if($fio) $this->parameters['fio'] = $fio; $this->parameters['limit'] = $limit; $this->parameters['offset'] = $offset;