summaryrefslogtreecommitdiffstats
path: root/application/core
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-05-15 11:23:57 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-05-15 11:23:57 +0200
commit017cd4eec466f33bdbcdc302368375cfe2b7c210 (patch)
treec285f5589293a91ab56a97f9d6837103937f63e1 /application/core
parentf8a57613ee33aa227aa829fdfc467125fe0da22c (diff)
Fix error handling in MY_Input->post_array()
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/core')
-rw-r--r--application/core/MY_Input.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/application/core/MY_Input.php b/application/core/MY_Input.php
index ef7af5528..4d43774c0 100644
--- a/application/core/MY_Input.php
+++ b/application/core/MY_Input.php
@@ -26,7 +26,13 @@ class MY_Input extends CI_Input {
public function post_array($key) {
$ret = parent::post($key);
- if (!is_array($ret)) {
+ if ($ret === false) {
+ return false;
+ } elseif (!is_array($ret)) {
+ $data = [
+ "key" => $key,
+ "ret" => $ret
+ ];
throw new \exceptions\UserInputException("input/invalid-form-field", "Invalid input", $data);
}
return $ret;