diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 2e39687..794b39d 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1505,10 +1505,11 @@ function template_preprocess_field(&$variables, $hook) { // readers. $variables['label'] = $element['#title']; - $variables['multiple'] = FALSE; - if ($itemsDefinition = $element['#items']->getFieldDefinition()) { - $variables['multiple'] = $itemsDefinition->getFieldStorageDefinition()->isMultiple(); - } + + // @todo Check for is_object() required due to pseudo field used in + // quickedit_test_entity_view_alter(). Remove this check after this is fixed + // in https://www.drupal.org/node/2550225. + $variables['multiple'] = is_object($element['#items']) ? $element['#items']->getFieldDefinition()->getFieldStorageDefinition()->isMultiple() : FALSE; static $default_attributes; if (!isset($default_attributes)) {