Everytime I edit a field within a Finder, I get this PHP notice added to my log:

Notice: Undefined property: stdClass::$name in finder_ui_field_form() (line 136 of [shortened]/sites/all/modules/finder/modules/finder_ui/includes/field.inc).

Sure enough, the block of code in question has a couple issues in it...

134    $field_item = NULL;
135    foreach ($finder->esetting($element, 'fields') as $field) {
136      if ($field->name == $field_key) {
137        $field_item = $field;
138        break;
139      }
140    }

1. Finder always sets $field_key to $field->table . '.' . $field->field, not $field->name.

You see that throughout this file. In fact, $field->name is not written anywhere else in the module. It doesn't exist.

2. $field_item is not used anywhere, rendering the entire block of code pointless.

This loop, even when fixed, sets a variable that is never referenced again. This block literally does nothing.

Solution: Remove the block of code.

Comments

PaperWeight’s picture

Removing the above code solved my issue - thanks for spotting that

  • danielb committed 72258ef on 7.x-2.x
    Issue #1875178 by DRippstein: Notice: Undefined property: stdClass::$...
danielb’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Issue summary: View changes
Status: Needs work » Fixed

removed

Status: Fixed » Closed (fixed)

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