Closed (fixed)
Project:
Ubercart
Version:
6.x-2.0-beta3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
4 Feb 2009 at 03:21 UTC
Updated:
19 Feb 2009 at 22:40 UTC
Jump to comment: Most recent file
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 *************
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uc_attribute.form_alter.patch | 965 bytes | cha0s |
Comments
Comment #1
cha0s commentedThanks 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...
Comment #2
Island Usurper commentedThanks. Committed to Bazaar.