From 04415f12a555caeb68bb6da0ab9fba01e07206e2 Mon Sep 17 00:00:00 2001
From: Alex ORLUC <alex.orluc@maarch.org>
Date: Fri, 5 Oct 2018 15:06:50 +0200
Subject: [PATCH] fix js error when no div errors

---
 apps/maarch_entreprise/index.php | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/apps/maarch_entreprise/index.php b/apps/maarch_entreprise/index.php
index 2a5779f255f..a5d7dbe1b1b 100755
--- a/apps/maarch_entreprise/index.php
+++ b/apps/maarch_entreprise/index.php
@@ -272,17 +272,15 @@ if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) {
     echo '<div id="content">';
     echo '<div class="error" id="main_error" onclick="this.hide();"></div>';
 
-    if (isset($_SESSION['error'])) {
-        echo '<div class="error" id="main_error_popup" onclick="this.hide();">';
-        echo functions::xssafe($_SESSION['error']);
-        echo '</div>';
-    }
+    echo '<div class="error" id="main_error_popup" onclick="this.hide();">';
+    echo functions::xssafe($_SESSION['error']);
+    echo '</div>';
+
+
+    echo '<div class="info" id="main_info" onclick="this.hide();">';
+    echo functions::xssafe($_SESSION['info']);
+    echo '</div>';
 
-    if (isset($_SESSION['info'])) {
-        echo '<div class="info" id="main_info" onclick="this.hide();">';
-        echo functions::xssafe($_SESSION['info']);
-        echo '</div>';
-    }
 
     if (isset($_SESSION['error']) && $_SESSION['error'] <> '') {
         ?>
-- 
GitLab