In admin area a user can actually save an order without products on it. When that happens an ugly foreach error appears: Invalid argument supplied for foreach() in /var/www/demo/sites/all/modules/uc_discount/uc_discount.module on line 773

This is related to #511254: $order->products should be initialised, but if that doesn't get in then we should patch uc_discount separately.

I attached a patch.

CommentFileSizeAuthor
no_products_order.patch484 bytesandreiashu

Comments

jantoine’s picture

Status: Active » Reviewed & tested by the community

The fix provided in the related issue #511254: $order->products should be initialised does not fix this issue, thus the submitted patch is still required. I have applied and tested the patch and it is ready to be contributed.

Cheers,

Antoine