Problem/Motivation

In the function _portable_path_field_attach_save(), the code does not test for a non-empty field. If the field is empty, then attempts to reference $entity->{$field_name}[$language][0]['format'] produce a notice about an undefined offset of zero.

The same situation was fixed in the function _portable_path_field_attach_load() in June 2013. See #1897970: Undefined index: in _portable_path_field_attach_load() (line 52 of and this commit

Proposed resolution

See the patch.

Remaining tasks

Review, test.

User interface changes

None.

API changes

None.

Comments

  • solotandem committed 3574bc1 on 7.x-1.x
    Issue #2325441: Eliminate PHP notice in _portable_path_field_attach_save...
solotandem’s picture

Assigned: Unassigned » solotandem
Status: Active » Fixed

Fixed in this commit.

Status: Fixed » Closed (fixed)

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