Separating this error out from #621918: Unknown Column 'a' in Where Clause.

Invalid argument supplied for foreach()uc_discounts/uc_discounts.module on line 1013 /1011

CommentFileSizeAuthor
#1 634718.patch1.72 KBezra-g

Comments

ezra-g’s picture

Status: Active » Needs review
StatusFileSize
new1.72 KB

This patch should resolve the error.

dave bruns’s picture

Just want to confirm that this patch resolved the "invalid arugument..." error for me. Brought Ubercart up to 2.2, enabled discounts alt, verified the error, installed the patch, and the error was gone.

DanielJohnston’s picture

Confirmed that this patch resolved the invalid argument error.

ezra-g’s picture

Status: Needs review » Fixed

Committed. Thanks for the reviews, everyone!

Status: Fixed » Closed (fixed)

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

lilacbow’s picture

Title: Invalid argument supplied for foreach()uc_discounts/uc_discounts.module on line 1013 /1011 » Invalid argument supplied for foreach()uc_discounts/uc_discounts.module on line 233
Status: Closed (fixed) » Active

I get this same error for a different line. It occurs when I SUBMIT an order. I'm just finishing building my own site. I am
a newbie.

* warning: Invalid argument supplied for foreach() in /home/clients/websites/w_q3c4v8/public_html/q3c4v8/sites/all/modules/uc_discounts_alt/uc_discounts/uc_discounts.module on line 233.
* We're sorry. An error occurred while processing your order that prevents us from completing it at this time. Please contact us and we will resolve the issue as soon as possible.

jrust’s picture

Status: Active » Closed (cannot reproduce)

Haven't been able to reproduce so I'm guessing it's fixed in the latest version.

yktdan’s picture

Title: Invalid argument supplied for foreach()uc_discounts/uc_discounts.module on line 233 » Invalid argument supplied for foreach() uc_discounts/uc_discounts.module on line 233

I get the error when using the admin path to create an order for a walk-in customer. I think it is because there is nothing in the product block on the screen which has the remark:
Loading product information... (If nothing happens, make sure you have Javascript enabled.)
JS is enabled.

However the view tab shows a product in the order.

The error may be in the admin path create order code such that it does not interact with discounts properly.