Csrf bugfixes

This commit is contained in:
Simon Sessingø
2016-11-15 08:46:14 +01:00
parent 9c413a3c53
commit 93562bd758
2 changed files with 18 additions and 1 deletions
+17
View File
@@ -30,6 +30,23 @@ class InputCollection implements \IteratorAggregate {
return $defaultValue;
}
public function getValue($index, $defaultValue = null) {
if(count($this->data)) {
if(isset($this->data[$index])) {
return $this->data[$index]->getValue();
}
foreach($this->data as $key => $value) {
if(strtolower($index) === strtolower($key)) {
return $value->getValue();
}
}
}
return $defaultValue;
}
/**
* @param $index
* @throws \InvalidArgumentException