From b6f7179b59498c1ceac029d734cde0766befd745 Mon Sep 17 00:00:00 2001 From: Markus Thielen Date: Mon, 18 Aug 2014 11:55:01 +0200 Subject: [PATCH] Impossible to access an attribute (\"custom_endpoint\") on a NULL variable My setup obviously does not have a authentication property set. This change fixes the error. --- Resources/views/layout.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index 018bd18..2ab14af 100755 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -396,7 +396,7 @@ {% else -%} var endpoint = '{{ endpoint }}'; {% endif -%} - {% if authentication.custom_endpoint %} + {% if authentication and authentication.custom_endpoint %} if ($('#api_endpoint') && typeof($('#api_endpoint').val()) != 'undefined') { endpoint = $('#api_endpoint').val(); }