Hi!

This patch adds a test to check $form_values['nid'] in uc_product_uc_add_to_cart_data() function.

Best regards.
lphm

Comments

Island Usurper’s picture

Status: Needs review » Fixed
StatusFileSize
new718 bytes

I've thought about this some and I'm not sure that FALSE is always supposed to be the default value for products that aren't actually nodes (like "blank line" products added to an order). I looked around for a setting in case I had the foresight to put one in, but all I found were those added to the node type settings. But that actually works, because the "product" type is usually the canonical product type so that setting can be the default value for this piece of data.

Refactored the patch a bit because you can't use $node before it's declared.

Committed.

Status: Fixed » Closed (fixed)
Issue tags: -PHP warnings (duplicate tag), -hook_uc_add_to_cart_data

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