Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi!
I get this warning after send an order:
warning: Invalid argument supplied for foreach() in .../sites/all/modules/uc_hotel/hotel_booking/hotel_booking.module on line 1214.
Before that, at the Order complete screen it displays this message:
Unable to send e-mail. Please contact the site administrator if the problem persists.
I don't know if this message is related to the previous warning... but I receive the client email with my order data, but I don't receive the store admin mail.
I'm on Drupal 6.14.
Thanks for this module...
Comment | File | Size | Author |
---|---|---|---|
#2 | 610230.patch | 1.61 KB | willvincent |
#3 | 610230-1.patch | 3.84 KB | willvincent |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedWhen I reviewed the order, in the store admin, the same warning displays:
warning: Invalid argument supplied for foreach() in .../sites/all/modules/uc_hotel/hotel_booking/hotel_booking.module on line 1214.
Comment #2
willvincent CreditAttribution: willvincent commentedThis warning is appearing because it's trying to check values of an array related to upgrade/addon products. That array doesn't exist in the order object unless addon products are added. This patch should solve that problem by adding an empty array even if there are no addon items added to the order.
The attached patch should take care of the invalid foreach argument warning. I don't believe the unable to send email message is related to the module.
Apply this patch from the uc_hotel directory.
Edit: Use the patch in comment #3, rather than this one.
Comment #3
willvincent CreditAttribution: willvincent commentedScratch that.. use this patch instead... the previous patch wasn't made properly, and didn't include both files that need altering to fix this issue; this one should.
Comment #4
larowlanTo get the admin email you need to set the store email address at admin->store->settings->contact settings
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedCan't apply the patch to hotel_booking.module file:
I tryed to correct the patch, but I am not very good with patches system...
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedOops! [#4] Thank you for help @larowlan. I installed this module on a clean drupal and I forget to fill the store settings.
Comment #7
willvincent CreditAttribution: willvincent commentedplace the patch file into your /modules/uc_hotel directory (or wherever your installed to)...
at the command prompt, type:
patch -p0 < 610230-1.patch
should apply just fine...
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedAfter applying the patch everything it's ok. Thanks
Comment #9
willvincent CreditAttribution: willvincent commentedCommitted to CVS.
Continue to use patch from post #3 until next release if not installing from cvs.
Comment #10
PepeMty CreditAttribution: PepeMty commentedThanks, Will!
Somehow I don't have SSH access :-(
Pepe
Comment #11
willvincent CreditAttribution: willvincent commentedI've added a devel snapshot for those who can't access cvs for various reasons. As of now (Oct. 30, 2009 10:25am CST) the only changes between the official release and devel snapshot are this patch and the patch to fix occupancy modifier updates from issue 618248.
Comment #12
PepeMty CreditAttribution: PepeMty commentedWill, as always, much obliged! :-)