diff options
author | Florian Pritz <bluewind@xinu.at> | 2017-05-15 11:23:57 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2017-05-15 11:23:57 +0200 |
commit | 017cd4eec466f33bdbcdc302368375cfe2b7c210 (patch) | |
tree | c285f5589293a91ab56a97f9d6837103937f63e1 /application | |
parent | f8a57613ee33aa227aa829fdfc467125fe0da22c (diff) |
Fix error handling in MY_Input->post_array()
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r-- | application/core/MY_Input.php | 8 |
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; |