This error message is cropping up all over the place when anything to do where MERCI is involved :-

warning: Invalid argument supplied for foreach() in sites/default/modules/merci/merci.module on line 3151.

The line in question is :-

      foreach ($node->merci['reservation_items'] as $item) {

which looks inoccuous enough...

We have reservation items.
We have set up MERCI permissions.
We have set up and removed (just in case they were causing problems) RROs.

I have tried uninstalling and re-installing it, but it makes no difference. We are using Drupal 6.1.5 and MERCI 6.x-1.x-dev (as of 18th Dec 2009). I can't find any trace of anyone else having the same issues. Maybe it is the combination of modules we are using?

Comments

danepowell’s picture

Status: Active » Postponed

Yes, this is a problem with the recently implemented token hook. The fix is mentioned in #5 of #462758: Provide more Tokens and still needs to be committed. Thanks for reporting.

mautumn’s picture

Cheers

kreynen’s picture

Status: Postponed » Fixed
ryersonArch’s picture

Category: bug » support
Status: Fixed » Active

I have the same error, but I do not have the reservation items set up. I installed the gallery, but I can't see the image I uploaded!
Somebody knows how to resolve this issue?

danepowell’s picture

ryerson- please confirm that you are getting the exact error:
warning: Invalid argument supplied for foreach() in sites/default/modules/merci/merci.module on line 3151.

Please also be sure that you are running the very latest dev release (January 13).

kreynen’s picture

Status: Active » Fixed

This was happening when merci_load($object) returned nothing because there were no content types configured as a Bucket or a Resource.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.