From a58bdb466ce5e18b712a51112cc0096abb8fd491 Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Tue, 17 Aug 2021 15:23:57 +0200 Subject: [PATCH] Fix error when options['customButtons'] is empty --- .../Resources/views/Entity/thirdparty.html.twig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig index 4ad66ce1d..0cd5960bf 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig @@ -92,14 +92,16 @@ {{ options['customButtons']['before'] }} {% endif %} - {%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%} + {% if options['customButtons']['replace'] is defined %} + {{ options['customButtons']['replace'] }} + {% elseif is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) %}
  • - {%- else -%} - {{ options['customButtons']['replace'] }} - {%- endif -%} + {% else %} + {# rien faire ? j'ai eu un bug car options['customButtons'] était vide (marc) #} + {% endif %} {% if options['customButtons']['after'] is defined %} {{ options['customButtons']['after'] }}