I'm getting notice:

Notice: Undefined index: attributes in theme_picture_formatter() (line 574 of /sites/all/modules/contrib/picture/picture.module).

because an image doesn't have alt/title text set.

Changing:

$item['attributes'] = $variables['attributes'];

to:

$item['attributes'] = isset($variables['attributes']) ? $variables['attributes'] : array();

in theme_picture_formatter gets rid of the notices.

I can make a patch.

Comments

attiks’s picture

Status: Active » Needs work

If you upload a patch, you'll get eternal credit ;-)

kristen pol’s picture

Status: Needs work » Needs review
StatusFileSize
new888 bytes

Here's the patch. :)

(Updating attribution on November 23, 2015.)

attiks’s picture

Status: Needs review » Fixed

It didn't apply anymore ;-)

  • attiks committed 43d8d72 on 7.x-2.x authored by Kristen Pol
    Issue #2297039 by Kristen Pol: Fixed Notice: Undefined index: attributes...

Status: Fixed » Closed (fixed)

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