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.
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 CreditAttribution: TR commentedWhat were you doing to see these message and what page were you seeing these on?
Comment #2
bschuele CreditAttribution: 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.