Modified GetPOSTArray and GetGETArray, because keys were not filled in

This commit is contained in:
OpenXE 2022-12-16 14:40:19 +00:00
parent c519d8030a
commit 84eaf1b495

View File

@ -135,8 +135,10 @@ class Secure
{ {
foreach($this->POST as $key=>$value) foreach($this->POST as $key=>$value)
{ {
$key = $this->GetPOST($key,"alpha+digit+specialchars",20); $value = $this->GetPOST($key);
$ret[$key]=$this->GetPOST($value); if ($value !== null) {
$ret[$key] = $value;
}
} }
} }
if(!empty($ret)) if(!empty($ret))
@ -153,8 +155,10 @@ class Secure
{ {
foreach($this->GET as $key=>$value) foreach($this->GET as $key=>$value)
{ {
$key = $this->GetGET($key,"alpha+digit+specialchars",20); $value = $this->GetGET($key);
$ret[$key]=$this->GetGET($value); if ($value !== null) {
$ret[$key] = $value;
}
} }
} }
if(!empty($ret)) if(!empty($ret))