From 3d38163a81ce1e5921be690348b30a2f6db62837 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 21 Sep 2017 11:32:10 +0200 Subject: Fix return checks for CI3 Signed-off-by: Florian Pritz --- application/controllers/User.php | 6 +++--- application/core/MY_Input.php | 4 ++-- application/models/Muser.php | 4 ++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/application/controllers/User.php b/application/controllers/User.php index 15eab1b2f..01e310a8f 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -302,15 +302,15 @@ class User extends MY_Controller { $this->duser->require_implemented("can_reset_password"); $key = $this->uri->segment(3); - if ($_SERVER["REQUEST_METHOD"] == "GET" && $key === false) { + if ($_SERVER["REQUEST_METHOD"] == "GET" && $key === null) { return $this->_reset_password_username_form(); } - if ($key === false) { + if ($key === null) { return $this->_reset_password_send_mail(); } - if ($key !== false) { + if ($key !== null) { return $this->_reset_password_form(); } } diff --git a/application/core/MY_Input.php b/application/core/MY_Input.php index 4d43774c0..5a08ea4bb 100644 --- a/application/core/MY_Input.php +++ b/application/core/MY_Input.php @@ -26,8 +26,8 @@ class MY_Input extends CI_Input { public function post_array($key) { $ret = parent::post($key); - if ($ret === false) { - return false; + if ($ret === null) { + return null; } elseif (!is_array($ret)) { $data = [ "key" => $key, diff --git a/application/models/Muser.php b/application/models/Muser.php index 00d14b7b9..72bcffde0 100644 --- a/application/models/Muser.php +++ b/application/models/Muser.php @@ -324,6 +324,10 @@ class Muser extends CI_Model { ->where('user', $userid) ->get()->row_array(); + if ($query === null) { + $query = []; + } + $extra_fields = array( "username" => $this->get_username(), "email" => $this->get_email($userid), -- cgit v1.2.3-24-g4f1b