From 660eddc69dc35ae86690d6562e688bb502973425 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 16 Aug 2019 15:06:56 -0400 Subject: [PATCH] Only open/close session if we are clearing a session var --- web/includes/Group.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/includes/Group.php b/web/includes/Group.php index a2ad252cd..3478f67f0 100644 --- a/web/includes/Group.php +++ b/web/includes/Group.php @@ -54,16 +54,16 @@ class Group extends ZM_Object { public static function get_group_dropdown( ) { - session_start(); $selected_group_id = 0; if ( isset($_REQUEST['groups']) ) { $selected_group_id = $group_id = $_SESSION['groups'] = $_REQUEST['groups']; } else if ( isset( $_SESSION['groups'] ) ) { $selected_group_id = $group_id = $_SESSION['groups']; } else if ( isset($_REQUEST['filtering']) ) { + zm_session_start(); unset($_SESSION['groups']); + session_write_close(); } - session_write_close(); return htmlSelect( 'Group[]', Group::get_dropdown_options(), isset($_SESSION['Group'])?$_SESSION['Group']:null, array( 'data-on-change' => 'submitThisForm',