diff options
-rw-r--r-- | application/controllers/file.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php index 5bfec4c44..4c9291b75 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -767,8 +767,9 @@ class File extends MY_Controller { $contents = $this->input->post("content"); $filenames = $this->input->post("filename"); - assert(is_array($filenames)); - assert(is_array($contents)); + if (!is_array($filenames) || !is_array($contents)) { + throw new \exceptions\UserInputException('file/websubmit/invalid-form', 'The submitted POST form is invalid'); + } $ids = array(); $ids = array_merge($ids, $this->_handle_textarea($contents, $filenames)); |