diff options
author | Mario <mario@mariovavti.com> | 2021-10-06 14:32:25 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-10-06 14:32:25 +0000 |
commit | 98eea41865b3488d5adf0cfa68d0d32973ca1cb5 (patch) | |
tree | fddc67f857afadef9136e395bf775351a88504fd /include/zid.php | |
parent | 8ac529f5aec365f6e65c3539779b62cedbd39a28 (diff) | |
download | volse-hubzilla-98eea41865b3488d5adf0cfa68d0d32973ca1cb5.tar.gz volse-hubzilla-98eea41865b3488d5adf0cfa68d0d32973ca1cb5.tar.bz2 volse-hubzilla-98eea41865b3488d5adf0cfa68d0d32973ca1cb5.zip |
fix drop_query_params() if no query params are left
Diffstat (limited to 'include/zid.php')
-rw-r--r-- | include/zid.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/zid.php b/include/zid.php index 422683c95..e462f8357 100644 --- a/include/zid.php +++ b/include/zid.php @@ -142,9 +142,9 @@ function clean_query_string($s = '') { function drop_query_params($s, $p) { $parsed = parse_url($s); - $query = ''; $query_args = null; + if(isset($parsed['query'])) { parse_str($parsed['query'], $query_args); } @@ -157,8 +157,11 @@ function drop_query_params($s, $p) { } } - if($query) + unset($parsed['query']); + + if($query) { $parsed['query'] = $query; + } return unparse_url($parsed); } |