Issue #1558548 by tim.plunkett, sun: Fixed Notice: Undefined index: default_image() in image_field_prepare_view().

merge-requests/26/head
webchick 2012-05-03 10:37:48 -07:00
parent db962a2a93
commit 59ce4ef9c8
1 changed files with 2 additions and 2 deletions

View File

@ -204,11 +204,11 @@ function image_field_prepare_view($entity_type, $entities, $field, $instances, $
if (empty($items[$id])) { if (empty($items[$id])) {
$fid = 0; $fid = 0;
// Use the default for the instance if one is available. // Use the default for the instance if one is available.
if ($instances[$id]['settings']['default_image']) { if (!empty($instances[$id]['settings']['default_image'])) {
$fid = $instances[$id]['settings']['default_image']; $fid = $instances[$id]['settings']['default_image'];
} }
// Otherwise, use the default for the field. // Otherwise, use the default for the field.
elseif ($field['settings']['default_image']) { elseif (!empty($field['settings']['default_image'])) {
$fid = $field['settings']['default_image']; $fid = $field['settings']['default_image'];
} }