From 7c265c57d253f7f3106869c3983b266ef98e3d22 Mon Sep 17 00:00:00 2001
From: Olivier PEREZ <olivier@olivierperez.fr>
Date: Thu, 23 Apr 2015 23:26:30 +0200
Subject: [PATCH] Fix 'Undefined variable' in purge page

---
 admin/purge.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/admin/purge.php b/admin/purge.php
index 80b0f4e2..5a8e2687 100644
--- a/admin/purge.php
+++ b/admin/purge.php
@@ -17,6 +17,7 @@
  * Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
  */
 
+use Framadate\Services\InputService;
 use Framadate\Services\LogService;
 use Framadate\Services\PurgeService;
 use Framadate\Services\SecurityService;
@@ -36,11 +37,12 @@ $message = null;
 $logService = new LogService();
 $purgeService = new PurgeService($connect, $logService);
 $securityService = new SecurityService();
+$inputService = new InputService();
 
 /* POST */
 /*-----*/
 
-$action = $inputService->filterName($_POST['action']);
+$action = $inputService->filterName(isset($_POST['action']) ? $_POST['action'] : null);
 
 /* PAGE */
 /* ---- */
-- 
GitLab