Comments

longwave’s picture

Status: Active » Needs review
StatusFileSize
new1.18 KB

Patch attached that fixes this issue.

snufkin’s picture

StatusFileSize
new6.35 KB

Adding two more wrappers when _uc_mailchimp_call_api is returning something and we loop through it via a foreach. Also contains patch in #1.

guypaddock’s picture

Version: 6.x-2.0 » 6.x-3.0

*Ahem* This is still an issue in 3.0... Can we get the maintainers to commit this fix?

guypaddock’s picture

The attached patches further extend the intent of the array_wrap.patch to both uc_checkout_pane_mailchimp() and uc_mailchimp_action_ecom_update() in version 3.0.

The patches also correct the whitespace in the uc_checkout_pane_mailchimp() and uc_mailchimp_action_ecom_update() functions to adhere to Drupal coding standards.

guypaddock’s picture

Attached are the above two patches rolled into one for the DRUPAL-6--2 branch.

BenK’s picture

Subscribing...

BenK’s picture

Subscribing...

arcaneadam’s picture

Assigned: Unassigned » arcaneadam

I'll take a look at this also this weekend.

vladgur’s picture

The patch doesnt work in latest, 6-3 version of the module.
subscribing

vladgur’s picture

The patch doesnt work in latest, 6-3 version of the module.
subscribing

Update: what i meant to say, patch in #5 doesnt work, patches in #4 work :)

eojthebrave’s picture

Re-rolled for 6.x-3.0, includes fix for invalid arguments and formatting for both uc_checkout_pane_mailchimp() and uc_mailchimp_action_ecom_update() functions.

Tested and working well.

rerooting’s picture

I am still getting this error with 6.x-3.0 - what am i doing wrong?

Warning: Invalid argument supplied for foreach() in uc_checkout_pane_mailchimp() (line 113 of /var/www/(site)/sites/all/modules/uc_mailchimp/uc_mailchimp.module).

scresante’s picture

The patch mentioned in #4 fixes the warning message.

This patch is not included in release 6.x-3.0 of uc_mailchimp, which hasn't been updated since this patch was posted.

Using Drupal version 6.20 and uc_mailchimp 6.x-3.0, patch in #5 does not work.

infosemantics’s picture

I've downloaded the patches from post #4 in this thread but when I look at the code there are lots of extra + and - characters at the beginning of each line. Not being a programmer, I'm a little unsure of what to do with these patch files.

Do I just paste the code from the patch files into the uc_mailchimp.module to replace the relevant functions? Do I have to remove all the extra line characters first?

Is there perhaps a cleaner way to do this, perhaps by downloading an updated version of uc_mailchimp.module that has all the fixes already included?

ktf’s picture

StatusFileSize
new2.2 KB

I fixed the error on line 113 by simply disabling the checkout pane altogether (I don't use it anyway). But a simple is_array() check will accomplish the same thing as well.

For the error on line 301, I used the attached patch. Maybe some of these will get committed one day :)