The query in uc_order_history() omits the order_status column. In the use case that calls uc_order_actions(), the latter is expecting the $order object to have an order_status property when it calls uc_order_status_data().

PHP does not generate an error and the code in uc_order_actions() "works" but likely for the wrong reason.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

solotandem’s picture

Status: Active » Needs review
FileSize
1.52 KB

Attached patch adds the order_status column to the query.

longwave’s picture

Status: Needs review » Needs work

Doesn't order_status then need to appear in the GROUP BY clause as well?

solotandem’s picture

It does on PostgreSQL, but not MySQL. Good catch. I added it to the patch.

longwave’s picture

Status: Needs work » Needs review
longwave’s picture

Status: Needs review » Fixed

Committed, thanks. Already fixed in 7.x.

Status: Fixed » Closed (fixed)

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