mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-23 11:22:11 +00:00
Fixed PHPMD global usage
This commit is contained in:
parent
7414958771
commit
e5ae2db418
@ -52,12 +52,13 @@ class ArrayInput extends AbstractInput
|
|||||||
|
|
||||||
public function getValue($name = null)
|
public function getValue($name = null)
|
||||||
{
|
{
|
||||||
if (!isset($_POST[$this->attributes["name"]]) || empty($_POST[$this->attributes["name"]])) {
|
$post = filter_input_array(INPUT_POST)[$this->attributes["name"]];
|
||||||
|
if (!isset($post) || empty($post)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
$clas = $this->options["array_type"];
|
$clas = $this->options["array_type"];
|
||||||
$arr = array();
|
$arr = array();
|
||||||
foreach ($_POST[$this->attributes["name"]] as $name => $value) {
|
foreach (array_keys($post) as $name) {
|
||||||
$input = new $clas();
|
$input = new $clas();
|
||||||
$input->setOption("name", $this->attributes["name"]);
|
$input->setOption("name", $this->attributes["name"]);
|
||||||
$arr[] = $input->getValue($name);
|
$arr[] = $input->getValue($name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user