summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-09-21 11:32:10 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-09-21 13:53:02 +0200
commit3d38163a81ce1e5921be690348b30a2f6db62837 (patch)
tree9f59debf7b6f18e9a56febdad0fef54eb59e85f4
parentab58703f61b1d0573444e357840d38533fb1ee85 (diff)
Fix return checks for CI3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/controllers/User.php6
-rw-r--r--application/core/MY_Input.php4
-rw-r--r--application/models/Muser.php4
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),