Skip to content

Commit

Permalink
Merge pull request #13461 from christianwach/lab-666
Browse files Browse the repository at this point in the history
Fix trailing ampersands when empty array passed as query param
  • Loading branch information
colemanw authored Jan 22, 2019
2 parents fe7f28f + ffa6291 commit 6b9ac69
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions CRM/Utils/System/WordPress.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,6 @@ public function url(

$queryParts = array();

// CRM_Core_Payment::getReturnSuccessUrl() passes $query as an array
if (isset($query) && is_array($query)) {
$query = implode($separator, $query);
}

if (
// not using clean URLs
!$config->cleanURL
Expand All @@ -283,7 +278,7 @@ public function url(
if ($wpPageParam) {
$queryParts[] = $wpPageParam;
}
if (isset($query)) {
if (!empty($query)) {
$queryParts[] = $query;
}

Expand Down

0 comments on commit 6b9ac69

Please sign in to comment.