diff options
-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); } |