Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix trailing ampersands when empty array passed as query param #13461

Merged
merged 1 commit into from
Jan 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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