When viewing the "option prices" section of the product edit page, I got the following errors:
Notice: Undefined variable: object in uc_price_per_role_option_prices_form() (line 391 of /home1/xxx/public_html/xxx/test/sites/all/modules/uc_price_per_role/uc_price_per_role.module).
Notice: Trying to get property of non-object in uc_price_per_role_option_prices_form() (line 391 of /home1/xxx/public_html/xxx/test/sites/all/modules/uc_price_per_role/uc_price_per_role.module).
On line 391, uc_price_per_role_option_prices_form() has the code drupal_set_title(check_plain($object->title));. Problem is, there is no such thing as $object. Changing it to
drupal_set_title(check_plain($product->title)); has fixed the errors.
Comments
Comment #1
SeanA commentedHere's a patch for this fix.
Comment #2
ParisLiakos commentedno need for check_plain btw..drupal_set_title already applies it
Comment #3
SeanA commentedYou're right, D7 does check_plain automatically now with drupal_set_title. The code probably came from the D6 version.
Comment #4
DanZ commentedCommitted #3. Note that this is a duplicate of #1537662: Notice: Undefined variable: object in uc_price_per_role_option_prices_form() (line 386 of, but this one gets rid of the check_plain().