Closed (fixed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Cart/checkout
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Jun 2011 at 09:22 UTC
Updated:
2 Jul 2011 at 18:41 UTC
I got Notice messages like:
Notice: Undefined index: 20 in uc_order_condition_count_products() (Zeile 344 von /home/www/web254/html/klb/sites/all/modules/ubercart/uc_order/uc_order.rules.inc).
Notice: Undefined index: 14 in uc_order_condition_count_products() (Zeile 344 von /home/www/web254/html/klb/sites/all/modules/ubercart/uc_order/uc_order.rules.inc).
Notice: Undefined index: 16 in uc_order_condition_count_products() (Zeile 344 von /home/www/web254/html/klb/sites/all/modules/ubercart/uc_order/uc_order.rules.inc).
Notice: Undefined index: 17 in uc_order_condition_count_products() (Zeile 344 von /home/www/web254/html/klb/sites/all/modules/ubercart/uc_order/uc_order.rules.inc).
after some trying they go away with this patch:
$ diff uc_order.rules.inc.org uc_order.rules.inc
332c332,336
< $totals[$product->nid] += $product->qty;
---
>
> if (isset($totals[$product->nid]))
> $totals[$product->nid] += $product->qty;
> else
> $totals[$product->nid] = $product->qty;
339c343,344
< $total += $totals[$product];
---
> if (isset($totals[$product]))
> $total += $totals[$product];
Comments
Comment #1
tr commentedWhat were you doing to see these message and what page were you seeing these on?
Comment #2
bschuele commentedit is always when I see an non-empty cart
So what I do is add an product to cart and then view the cart.
Comment #3
longwaveFix committed, thanks.