You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PiplApi_SearchAPIError: The query does not contain any valid name/username/phone/email to search by in PiplApi_APIError::from_dict() (line 35 of vendor/piplcom/piplapis-php/src/piplapis/error.php).
require_once getcwd() .'/sites/all/vendor/piplcom/piplapis-php/src/piplapis/search.php';
$params = array(
'api_key' => 'redacted',
'first_name' => 'Test',
'middle_name' => '',
'last_name' => 'Test',
'city' => 'Beverly Hills',
'country' => 'US',
'state' => 'CA',
'phone' => '8885550123',
'email' => '[email protected]',
);
$request = new PiplApi_SearchAPIRequest($params);
$request->send(FALSE);
results in the following exception:
PiplApi_SearchAPIError: The query does not contain any valid name/username/phone/email to search by in PiplApi_APIError::from_dict() (line 35 of vendor/piplcom/piplapis-php/src/piplapis/error.php).
I was able to fix the issue. See diff below:
diff --git a/src/piplapis/search.php b/src/piplapis/search.php
index c3266a9..c72c480 100644
--- a/src/piplapis/search.php
+++ b/src/piplapis/search.php
@@ -455,7 +455,7 @@ class PiplApi_SearchAPIRequest
'filter_records_by' => $this->_filter_records_by
);
}
public function send($strict_validation=true)
@@ -730,4 +730,4 @@ class PiplApi_SearchAPIError extends PiplApi_APIError
// error.
}
Apparently, my server was using '&' as the default http_build_query separator and this was causing problems with the API.
The text was updated successfully, but these errors were encountered: