From b9c4b5d2a7f53d69b57d65814f2be924cc230219 Mon Sep 17 00:00:00 2001 From: Fabio Chelly Date: Thu, 7 Nov 2013 16:38:53 +0100 Subject: [PATCH] [-] FO : Prevents warning in safePostVars when $_POST has been unset --- classes/Tools.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/Tools.php b/classes/Tools.php index dc6a74cd4..f9f6eddd7 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -689,9 +689,10 @@ class ToolsCore public static function safePostVars() { - if (!is_array($_POST)) - return array(); - $_POST = array_map(array('Tools', 'htmlentitiesUTF8'), $_POST); + if (!isset($_POST) || !is_array($_POST)) + $_POST = array(); + else + $_POST = array_map(array('Tools', 'htmlentitiesUTF8'), $_POST); } /**