Skip to content
Snippets Groups Projects
Commit 7449c3e6 authored by Kurt Trowbridge's avatar Kurt Trowbridge Committed by Adam Nagy
Browse files

Issue #3241647: "Undefined index: #type" error when combined with Remote Stream Wrapper

parent 57fa6169
No related branches found
No related tags found
1 merge request!1Issue #3241647: "Undefined index: #type" error when combined with Remote Stream Wrapper
......@@ -190,7 +190,7 @@ function media_entity_file_replace_form_media_form_alter(&$form, FormStateInterf
// widget outright.
// This must be done in a process callback, since the action buttons on
// the widget are themselves added in a process callback.
if (isset($form[$sourceFieldName]['widget'][0]) && $form[$sourceFieldName]['widget'][0]['#type'] === 'managed_file') {
if (isset($form[$sourceFieldName]['widget'][0]) && isset($form[$sourceFieldName]['widget'][0]['#type']) && $form[$sourceFieldName]['widget'][0]['#type'] === 'managed_file') {
$form[$sourceFieldName]['widget'][0]['#process'][] = '_media_entity_file_replace_disable_remove_button';
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment