Commit ebfc1a4e authored by alexpott's avatar alexpott
Browse files

Issue #2165223 by Berdir, fago: Misleading fatal error when specifying a field...

Issue #2165223 by Berdir, fago: Misleading fatal error when specifying a field type that is not available for a base field.
parent 8833cc0a
......@@ -86,6 +86,9 @@ public function getClass() {
// the default list class from the item type.
$item_type_definition = \Drupal::typedDataManager()
->getDefinition($this->getItemDefinition()->getDataType());
if (!$item_type_definition) {
throw new \LogicException(format_string('An invalid data type @plugin_id has been specified for list items.', array('@plugin_id' => $this->getItemDefinition()->getDataType())));
}
return $item_type_definition['list_class'];
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment