PHP Error on register

More
07 Oct 2010 19:29 #283 by daycom
PHP Error on register was created by daycom
This is the message I get after clicking the final Register button (and subscribing to the newsletter) in the JomSocial registration:

Warning: Invalid argument supplied for foreach() in /home/pw2/public_html/components/com_joomailermailchimpsignup/models/joomailermailchimpsignup.php on line 269

Fatal error: Cannot redeclare class MCAPI in /home/pw2/public_html/plugins/user/MCAPI.class.php on line 3

Please Log in or Create an account to join the conversation.

More
07 Oct 2010 19:53 #284 by chris
Replied by chris on topic PHP Error on register
Hi,

Are you using the latest version?

Do you have any other plugins installed that interact with Mailchimp?

Cheers,

Chris

Please Log in or Create an account to join the conversation.

More
07 Oct 2010 20:02 #285 by daycom
Replied by daycom on topic PHP Error on register
It appears to be the latest version in the Plugins and Components under Extensions Manager.

No other MailChimp plugins on this site, and I used the API key that I created for it today.

Please Log in or Create an account to join the conversation.

More
07 Oct 2010 20:05 #286 by chris
Replied by chris on topic PHP Error on register
Right. If you send admin login information to contact _at_ joomailer dot com then one of us will take a look to see if we can work out what is causing the problem.

Cheers,

Chris

Please Log in or Create an account to join the conversation.

More
12 Oct 2010 19:33 #298 by daycom
Replied by daycom on topic PHP Error on register
Solved. Gracias!

Please Log in or Create an account to join the conversation.

More
15 Oct 2010 01:33 #311 by shinkendo
Replied by shinkendo on topic PHP Error on register
could you please share how this was solved? I'm having the same issue.
Thanks.

Please Log in or Create an account to join the conversation.

More
15 Oct 2010 14:44 #312 by chris
Replied by chris on topic PHP Error on register
Hi,

Which error are you receiving? If it is the Fatal error then you need to look for a plugin called mailchimp under Plugins->User and disable it.

If you have the foreach Warning then what you need to do is change code in .../components/com_joomailermailchimpsignup/models/joomailermailchimpsignup.php.

Change
Code:
foreach($merges as $k => $v) { $merges_string .= "name=".$k."\n"; if(is_array($v)) { $merges_string .= "value="; foreach($v as $vv) { $merges_string .= $vv."||"; } } else { $merges_string .= "value=".$v; } $merges_string .= "\n\n"; }

to
Code:
if($merges) { foreach($merges as $k => $v) { $merges_string .= "name=".$k."\n"; if(is_array($v)) { $merges_string .= "value="; foreach($v as $vv) { $merges_string .= $vv."||"; } } else { $merges_string .= "value=".$v; } $merges_string .= "\n\n"; } }

and this error should go away.

Cheers,

Chris

Please Log in or Create an account to join the conversation.