File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -634,6 +634,12 @@ function mailchimp_sf_save_general_form_settings() {
634
634
* Sees if the user changed the list, and updates options accordingly
635
635
**/
636
636
function mailchimp_sf_change_list_if_necessary () {
637
+ if ( empty ( $ _POST ['mc_list_id ' ] ) ) {
638
+ $ msg = '<p class="error_msg"> ' . esc_html ( __ ( 'Please choose a valid list ' , 'mailchimp_i18n ' ) ) . '</p> ' ;
639
+ mailchimp_sf_global_msg ( $ msg );
640
+ return ;
641
+ }
642
+
637
643
// Simple permission check before going through all this
638
644
if ( ! current_user_can ( MCSF_CAP_THRESHOLD ) ) { return ; }
639
645
@@ -649,7 +655,7 @@ function mailchimp_sf_change_list_if_necessary() {
649
655
650
656
$ lists = $ lists ['lists ' ];
651
657
652
- if ( is_array ( $ lists ) && ! empty ( $ lists ) && isset ( $ _POST [ ' mc_list_id ' ] ) ) {
658
+ if ( is_array ( $ lists ) && ! empty ( $ lists ) ) {
653
659
654
660
/**
655
661
* If our incoming list ID (the one chosen in the select dropdown)
You can’t perform that action at this time.
0 commit comments