$iptc = iptcparse($info['APP13']);
foreach ($iptc as $key => $value) {
  foreach ($value as $innerkey => $innervalue) {
    $ret .= $innervalue . ' ';
  }
}

iptcparse() can return an array or FALSE according to the PHP docs, resulting in notices in the watchdog:

Warning: Invalid argument supplied for foreach() in SearchApiAttachmentsAlterSettings->extract_exif() (line 159 in /[...]/sites/all/modules/contrib/search_api_attachments/includes/callback_attachments_settings.inc).

Comments

idebr’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.34 KB

Patch attached

izus’s picture

Status: Needs review » Fixed

Merged to 7.x-1.x
Thanks

idebr’s picture

Thanks for the commit credits, much appreciated! :)

Status: Fixed » Closed (fixed)

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