Skip to content

Commit

Permalink
Merge pull request #24192 from demeritcowboy/php81-frontend4
Browse files Browse the repository at this point in the history
[php 8.1 compat] Avoid CRM_Utils_System::url null for $query param
  • Loading branch information
eileenmcnaughton authored Aug 9, 2022
2 parents b75b95b + cbb4fa5 commit 9a397a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions CRM/Utils/System/DrupalBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,16 @@ public function url(
$separator = '&';

if (!$config->cleanURL) {
if (isset($path)) {
if (isset($query)) {
if ($path !== NULL && $path !== '' && $path !== FALSE) {
if ($query !== NULL && $query !== '' && $query !== FALSE) {
return $base . $script . '?q=' . $path . $separator . $query . $fragment;
}
else {
return $base . $script . '?q=' . $path . $fragment;
}
}
else {
if (isset($query)) {
if ($query !== NULL && $query !== '' && $query !== FALSE) {
return $base . $script . '?' . $query . $fragment;
}
else {
Expand All @@ -189,16 +189,16 @@ public function url(
}
}
else {
if (isset($path)) {
if (isset($query)) {
if ($path !== NULL && $path !== '' && $path !== FALSE) {
if ($query !== NULL && $query !== '' && $query !== FALSE) {
return $base . $path . '?' . $query . $fragment;
}
else {
return $base . $path . $fragment;
}
}
else {
if (isset($query)) {
if ($query !== NULL && $query !== '' && $query !== FALSE) {
return $base . $script . '?' . $query . $fragment;
}
else {
Expand Down

0 comments on commit 9a397a7

Please sign in to comment.