From 017cd4eec466f33bdbcdc302368375cfe2b7c210 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 15 May 2017 11:23:57 +0200 Subject: Fix error handling in MY_Input->post_array() Signed-off-by: Florian Pritz --- application/core/MY_Input.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3-24-g4f1b