Commit 47d863a0 authored by drumm's avatar drumm
Browse files

Avoid exception in field admin UI

parent dade81b8
......@@ -613,6 +613,10 @@ function project_release_field_widget_form_alter(&$element, &$form_state, $conte
break;
case 'field_project_issue_version_opts':
if (empty($element['#entity'])) {
// Happens in field admin UI.
break;
}
$wrapper = entity_metadata_wrapper('node', $element['#entity']);
if ($wrapper->field_project_has_releases->value()) {
// Show issue counts for version options.
......
Supports Markdown
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