After submitting, I get this message at the top of the site

Permalink Browser Info Environment
After testing and submitting my email address, I get this error that pops at the top of the website:


Warning: Invalid argument supplied for foreach() in /home2/texstarw/public_html/packages/mail_monkey/blocks/monkey_block/controller.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /home2/texstarw/public_html/packages/mail_monkey/blocks/monkey_block/controller.php:37) in /home2/texstarw/public_html/updates/concrete5.6.0.2/concrete/core/libraries/view.php on line 901

Any suggesetions?

Type: Discussion
Status: New
texstar
View Replies:
Highlight replied on at Permalink Reply
Highlight
Same error here:
Warning: Invalid argument supplied for foreach() in C:\wamp\www\highlight_concrete5\packages\mail_monkey\blocks\monkey_block\controller.php on line 37
Highlight replied on at Permalink Reply
Highlight
Ok, i fund this in another thred, it work for me.

In packages/mail_monkey/blocks/monkey_block/controller.php line 37 change:
$interest = $this->post('interest');
         foreach($interest as $id=>$name_array){
            $names = '';
            $i=0;
            foreach($name_array as $name){
                if($i){ $names .= ','; }
                $names .= $name;
                $i++;
            }
            $groupedup[] = array('id'=>$id, 'groups'=>$names);
         }


To this:
$interest = $this->post('interest');
         if ( $interest ) 
         {
            foreach($interest as $id=>$name_array){
               $names = '';
               $i=0;
               foreach($name_array as $name){
                  if($i){ $names .= ','; }
                  $names .= $name;
                  $i++;
               }
               $groupedup[] = array('id'=>$id, 'groups'=>$names);
            }
         }
JonRimmer replied on at Permalink Reply
JonRimmer
Worked for me too. Excellent Thanks you
cbatkin replied on at Permalink Reply
cbatkin
Hi! I had exactly the same error issue and this fix worked for me also - many thanks for posting that up! Cheers!

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.