kraftbj / genesis-enews-extended

WordPress widget to provide additional functionality to the Genesis eNews widget.
https://kraft.blog/genesis-enews-extended/
Other
12 stars 15 forks source link

Ajax error on save when MailPoet isn't active #119

Closed norcross closed 9 years ago

norcross commented 9 years ago

When adding the widget into a sidebar area, or saving the settings, an undefined index error throws for the MailPoet fields, since they don't exist. below is what I added on my version as a fix, but not sure if this matches up with your desired formatting. this is in the update function on line 164

    if ( isset( $new_instance['mailpoet_check'] ) ) {
        $new_instance['mailpoet_check']  = wp_kses_post( $new_instance['mailpoet_check'] );
    }

    if ( isset( $new_instance['mailpoet_subbed'] ) ) {
        $new_instance['mailpoet_subbed']  = wp_kses_post( $new_instance['mailpoet_subbed'] );
    }
kraftbj commented 9 years ago

I'm down with the braces. The shortcut methods always slow me down when reading through code.