Commit a3367165 authored by kaido.toomingas's avatar kaido.toomingas Committed by zvse

Issue #2957685 by kaido24, zvse: Error with Drupal 8.5.1

parent 817f7da9
......@@ -520,7 +520,7 @@ function youtube_token_info_alter(&$data) {
foreach ($youtube_fields as $field) {
$field_info = FieldConfig::loadByName($field['entity_type'], $field['bundle'], $field['field_name']);
$field_label = $field_info->getLabel();
$field_label = $field_info ? $field_info->getLabel() : '';
// Modify the default field token.
$data['tokens'][$field['entity_type']][$field['field_name']] = [
......
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