From cc3e66cacbe7ec2b90f03f97bcbfdbb867d5a888 Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 30 Jan 2024 23:58:33 +0100 Subject: [PATCH] according to phpstan: isset is not required here --- system/init.php | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/system/init.php b/system/init.php index 21de3a0c..8ff47583 100644 --- a/system/init.php +++ b/system/init.php @@ -59,27 +59,20 @@ define('ACTION', $action); $errors = []; // trim values we receive -if(isset($_POST)) -{ - foreach($_POST as $var => $value) { - if(is_string($value)) { - $_POST[$var] = trim($value); - } +foreach($_POST as $var => $value) { + if(is_string($value)) { + $_POST[$var] = trim($value); } } -if(isset($_GET)) -{ - foreach($_GET as $var => $value) { - if(is_string($value)) - $_GET[$var] = trim($value); - } + +foreach($_GET as $var => $value) { + if(is_string($value)) + $_GET[$var] = trim($value); } -if(isset($_REQUEST)) -{ - foreach($_REQUEST as $var => $value) { - if(is_string($value)) - $_REQUEST[$var] = trim($value); - } + +foreach($_REQUEST as $var => $value) { + if(is_string($value)) + $_REQUEST[$var] = trim($value); } // load otserv config file