if $_REQUEST['search_params'] is not set, this could throw an undefined index notice.  We might have to check for empty first, maybe something like:
$prior_search_params[$subpanel_name] = trim(!empty($_REQUEST['search_params'])?$_REQUEST['search_params']:'');