Security update for Core, with self-updated composer
[yaffs-website] / vendor / drupal / console / templates / module / src / Form / form-alter.php.twig
index 748e9b8a4e76be0bf80ba08b63f7f04a69266e9f..f4bf25b18c49b3acc313ca451acfe406bf748263 100644 (file)
@@ -34,16 +34,16 @@ function {{ module }}_form_alter(&$form, FormStateInterface $form_state, $form_i
         $form['{{ input.name }}'] = [
             '#type' => '{{ input.type }}',
             '#title' => t('{{ input.label|e }}'),
-    {%- if input.description is defined -%}
+    {%- if input.description is defined and input.description is defined -%}
             '#description' => t('{{ input.description|e }}'),
     {% endif %}
     {%- if input.options is defined and input.options|length -%}
             '#options' => {{ input.options }},
     {% endif %}
-    {%- if input.maxlength|length -%}
+    {%- if input.maxlength is defined and input.maxlength|length -%}
             '#maxlength' => {{ input.maxlength }},
     {% endif %}
-    {%- if input.size|length -%}
+    {%- if input.size is defined and input.size|length -%}
             '#size' => {{ input.size }},
     {% endif %}
     {%- if input.default_value is defined and input.default_value|length -%}