From 970f65b7057bb0f747f0f026e49064144bdbfbf1 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Sat, 18 Jan 2020 19:20:48 +0100 Subject: [PATCH] Null check for optional query string in e107::url() --- e107_handlers/e107_class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 30d0b7486..9f2faec83 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -3559,7 +3559,7 @@ class e107 // Avoid duplicate query keys. eg. URL has ?id=x and $options['query']['id'] exists. // @see forum/e_url.php - topic/redirect and forum/view_shortcodes.php sc_post_url() - list($legacyUrl, $tmp) = explode("?", $legacyUrl); + list($legacyUrl, $tmp) = array_pad(explode("?", $legacyUrl), 2, null); if (!empty($tmp)) {