From 6d60457ad9262e98229ee27a4f2d2b95ae58d73b Mon Sep 17 00:00:00 2001 From: Oleg Milantiev Date: Thu, 2 Aug 2018 10:39:42 +0300 Subject: [PATCH] Got crash on SF3.4, fix it --- Resources/views/Form/typeahead.html.twig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Resources/views/Form/typeahead.html.twig b/Resources/views/Form/typeahead.html.twig index 0523927..f5636a4 100644 --- a/Resources/views/Form/typeahead.html.twig +++ b/Resources/views/Form/typeahead.html.twig @@ -59,7 +59,11 @@ {% if simple %} {% set _id, _value, _render = child, child, child %} {% else %} - {% set _id, _value, _render = child.id, attribute(child, property ?: 'id'), attribute(child, render) %} + {% if child is null %} + {% set _id, _value, _render = null, null, null %} + {% else %} + {% set _id, _value, _render = child.id, attribute(child, property ?: 'id'), attribute(child, render) %} + {% endif %} {% endif %}