The isset($attribute) at line 93 in the module file should probably check the $field attributes if I understand the intent correctly:
if ($attribute == 'render') {
$output[] = theme('image_formatter', array('item' => $field, 'image_style' => $type));
}
elseif (isset($attribute) && !empty($attribute)) {
$output[] = $field[$attribute];
}
else {
$output[] = image_style_url($token, $field['uri']);
}
Like so:
if ($attribute == 'render') {
$output[] = theme('image_formatter', array('item' => $field, 'image_style' => $type));
}
elseif (isset($field[$attribute]) && !empty($attribute)) {
$output[] = $field[$attribute];
}
else {
$output[] = image_style_url($token, $field['uri']);
}
Cheers,
JP
Comments
Comment #1
jpstrikesback commentedHere's a patch.
Comment #2
jpstrikesback commentedstatus...
Comment #3
byue commentedTried the patch, problems solved! Thank You!
Comment #4
cmonnow commentedI assume you would use something like this instead?
since you wouldn't check if an array key exists before you've determined the key itself exists?
Comment #5
mediaformat commentedpatch works!
Comment #6
cmonnow commentedBut the patch will produce an error if $attribute hasn't been set.
Comment #7
mediaformat commentedErrors were still produced.
Here is a new patch based on jpstrikesback and cmonnow's snippets.
Comment #8
maxplus commentedThanks!
#7 solved this issue for me
Comment #9
damienmckennaCommitted. Thanks!