Skip to content

Commit af59b87

Browse files
author
Paweł Maślak
committed
fixed issue with passing parameters in seachContacts() method
1 parent 15c774e commit af59b87

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/GetResponseAPI3.class.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function getContact($contact_id)
149149
*/
150150
public function searchContacts($params = null)
151151
{
152-
return $this->call('search-contacts/' . $this->setParams($params));
152+
return $this->call('search-contacts?' . $this->setParams($params));
153153
}
154154

155155
/**
@@ -356,10 +356,8 @@ private function call($api_method = null, $http_method = 'GET', $params = array(
356356
if ($http_method == 'POST') {
357357
$options[CURLOPT_POST] = 1;
358358
$options[CURLOPT_POSTFIELDS] = $params;
359-
} else {
360-
if ($http_method == 'DELETE') {
361-
$options[CURLOPT_CUSTOMREQUEST] = 'DELETE';
362-
}
359+
} else if ($http_method == 'DELETE') {
360+
$options[CURLOPT_CUSTOMREQUEST] = 'DELETE';
363361
}
364362

365363
$curl = curl_init();

0 commit comments

Comments
 (0)