From 3f518c92630514d7c9b69b1b8ce5ef94b78e5675 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 24 May 2021 16:14:17 +0200 Subject: [PATCH] [ticket/16138] Use array to pass parameters to append_sid() PHPBB3-16138 --- phpBB/includes/functions_posting.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 570510f0f7..1f9c71c16d 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2541,23 +2541,24 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data } } - $params = $add_anchor = ''; + $params = []; + $add_anchor = ''; if ($post_visibility == ITEM_APPROVED || ($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) || ($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE)))) { - $params .= '&t=' . $data_ary['topic_id']; + $params['t'] = $data_ary['topic_id']; if ($mode != 'post') { - $params .= '&p=' . $data_ary['post_id']; + $params['p'] = $data_ary['post_id']; $add_anchor = '#p' . $data_ary['post_id']; } } else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic') { - $params .= '&t=' . $data_ary['topic_id']; + $params['t'] = $data_ary['topic_id']; } $url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";