Skip to content

Commit

Permalink
UrlQueryHelper: Fix passing null to urlencode (vufind-org#3136)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuomaJuha committed Oct 3, 2023
1 parent d067f93 commit cf9be47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/VuFind/src/VuFind/Search/UrlQueryHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,10 @@ public static function buildQueryString($a, $escape = true)
foreach ($a as $key => $value) {
if (is_array($value)) {
foreach ($value as $current) {
$parts[] = urlencode($key . '[]') . '=' . urlencode($current);
$parts[] = urlencode($key . '[]') . '=' . urlencode($current ?? '');
}
} else {
$parts[] = urlencode($key) . '=' . urlencode($value);
$parts[] = urlencode($key) . '=' . urlencode($value ?? '');
}
}
$retVal = implode('&', $parts);
Expand Down

0 comments on commit cf9be47

Please sign in to comment.