From b7839c05242bd289c846febae2b80ef9147ab223 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 25 Nov 2014 09:38:57 -0500 Subject: [PATCH] Fix query string for member button API call. * memberdashboard.php (memberdashboard_civicrm_post): Manually construct query string instead of using 'http_build_query'. --- memberdashboard.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/memberdashboard.php b/memberdashboard.php index a8890f0..bb7e823 100644 --- a/memberdashboard.php +++ b/memberdashboard.php @@ -147,16 +147,13 @@ function memberdashboard_civicrm_post($op, $objectName, $objectId, &$objectRef) 'name' => 'memberdashboard_button_api_password', 'group' => MEMBERDASHBOARD_SETTINGS_GROUP )); - $params = http_build_query(array( - 'contact_id' => $contactId, - 'date' => $joinDate - )); if(!empty($apiUrl) && !empty($user) && !empty($password)) { + $url = "$apiUrl?contact_id=" . $contactId . "&date=" . $joinDate; $curl = curl_init(); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_USERPWD, "$user:$password"); - curl_setopt($curl, CURLOPT_URL, "$apiUrl?$params"); + curl_setopt($curl, CURLOPT_URL, $url); curl_exec($curl); } } -- 2.25.1