The function _uc_attribute_alter_form tests a variable that doesn't exist. By adding an extra check to see if the variable isset, and by moving the variable assignment to after the test, the error message disappears.

File: uc_attribute.module

586 // If the product doesn't have attributes, return the form as it is.
587 if (!isset ($product->attributes) || !is_array($product->attributes)) { ********** altered this line ********
588 return NULL;
589 }
590
591 $attributes = $product->attributes; ************ moved from line 585 *************

CommentFileSizeAuthor
#1 uc_attribute.form_alter.patch965 bytescha0s

Comments

cha0s’s picture

Assigned: Unassigned » cha0s
Status: Active » Needs review
StatusFileSize
new965 bytes

Thanks for the report. =) I moved that check to the very top of that function, I figured it's better to drop out as early as possible...

Island Usurper’s picture

Status: Needs review » Fixed

Thanks. Committed to Bazaar.

Status: Fixed » Closed (fixed)

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