_uc_cart_product_get_options() fails with the above error if the $data field does not exist in the product $item. This can happen when previewing a new product and there is a module that implements hook_uc_product_alter(), and that implementation calls _uc_cart_product_get_options().

Yes, you're not really supposed to call underscore functions from outside of that one module, but uc_price_per_role does.

#1 ubercart_undefined_options_data-1897242-1.patch445 bytesDanZ
PASSED: [[SimpleTest]]: [MySQL] 2,798 pass(es).
[ View ]


DanZ’s picture

Status:Active» Needs review
new445 bytes
PASSED: [[SimpleTest]]: [MySQL] 2,798 pass(es).
[ View ]

This little patch fixes it.

longwave’s picture

Arguably, uc_price_per_role could check this before calling, but I guess this doesn't really hurt anything.

DanZ’s picture

Yes, uc_price_per_role could do the check.

However, that would be a workaround, and won't help other add-on modules. I'd rather have a fix.

longwave’s picture

Status:Needs review» Fixed


Status:Fixed» Closed (fixed)

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

Anonymous’s picture

Issue summary:View changes