Skip to content

Commit

Permalink
Ensure we have an array of interest groups before iterating
Browse files Browse the repository at this point in the history
This shouldn't be necessary as the get_option() has the "default" argument as an empty array(), but somehow people are getting error messages, so we're putting the explicit check in.
  • Loading branch information
bigdawggi committed Oct 20, 2011
1 parent d3726ac commit b32de9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mailchimp.php
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,9 @@ function mailchimpSF_signup_submit() {
// Head back to the beginning of the merge vars array
reset($mv);

// Ensure we have an array
$igs = !is_array($igs) ? array() : $igs;

foreach ($igs as $ig) {
if (get_option('mc_show_interest_groups_'.$ig['id']) == 'on') {
$groupings = array();
Expand Down

0 comments on commit b32de9a

Please sign in to comment.