Commit 54cbc4b1 authored by git's avatar git Committed by olstjos

Issue #2597754 by y_h: Undefined index: instance in media_form_field_ui_field_edit_form_alter

parent 7d7aee29
......@@ -368,7 +368,7 @@ function media_form_field_ui_field_edit_form_alter(&$form, &$form_state) {
// Add a validation function to any field instance which uses the media widget
// to ensure that the upload destination scheme is one of the allowed schemes
// if any defined by settings.
if ($form['instance']['widget']['type']['#value'] == 'media_generic' && isset($form['#field']['settings']['uri_scheme'])) {
if (isset($form['instance']['widget']) && $form['instance']['widget']['type']['#value'] == 'media_generic' && isset($form['#field']['settings']['uri_scheme'])) {
$form['#validate'][] = 'media_field_instance_validate';
}
}
......
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