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); } /**