This is happening when adding a new line item to an order and change the quantity at the same time.

Notice: Undefined property: EntityFieldQuery::$ordered_results in commerce_cart_commerce_line_item_presave() (line 395 of /webs/contrib/sprintcommerce/sites/all/modules/drupalcommerce/modules/cart/commerce_cart.module).
Warning: Invalid argument supplied for foreach() in commerce_cart_commerce_line_item_presave() (line 395 of /webs/contrib/sprintcommerce/sites/all/modules/drupalcommerce/modules/cart/commerce_cart.module).

Steps to reproduce this:
Edit an existing order
Add a new product line item
Change the quantity of the new product line item
Hit save
Enjoy

Comments

Bojhan’s picture

Title: Warning when adding new line items to an order » A warning when adding new line items to an order
netsensei’s picture

Status: Active » Needs review

Fixed with help from pcambra and rszrama:

https://github.com/rszrama/drupalcommerce/pull/26

rszrama’s picture

Status: Needs review » Fixed

Pulled in and tested as part of my work on #1035006: Create entity properties for orders in line items. Committed!

Status: Fixed » Closed (fixed)
Issue tags: -dcsprint5

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