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

SeanA’s picture

StatusFileSize
new636 bytes

Here's a patch for this fix.

ParisLiakos’s picture

no need for check_plain btw..drupal_set_title already applies it

SeanA’s picture

StatusFileSize
new623 bytes

You're right, D7 does check_plain automatically now with drupal_set_title. The code probably came from the D6 version.

DanZ’s picture

Status: Needs review » Fixed

Committed #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().

Status: Fixed » Closed (fixed)

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