Added support for input stream when not json encoded

This commit is contained in:
Simon
2023-11-21 16:08:22 +01:00
parent d3b1577095
commit 08d78c8f71
+7 -5
View File
@@ -82,6 +82,8 @@ class InputHandler
if ($post !== false) {
$this->originalPost += $post;
}
} else {
parse_str($contents, $this->originalPost);
}
}
@@ -108,7 +110,7 @@ class InputHandler
foreach ($files as $key => $value) {
// Parse multi dept file array
if(isset($value['name']) === false && is_array($value) === true) {
if (isset($value['name']) === false && is_array($value) === true) {
$list[$key] = $this->parseFiles($value, $key);
continue;
}
@@ -231,7 +233,7 @@ class InputHandler
{
$element = null;
if(count($methods) > 0) {
if (count($methods) > 0) {
$methods = is_array(...$methods) ? array_values(...$methods) : $methods;
}
@@ -303,9 +305,9 @@ class InputHandler
public function exists($index, ...$methods): bool
{
// Check array
if(is_array($index) === true) {
foreach($index as $key) {
if($this->value($key, null, ...$methods) === null) {
if (is_array($index) === true) {
foreach ($index as $key) {
if ($this->value($key, null, ...$methods) === null) {
return false;
}
}