summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-09-18 12:45:31 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-09-18 12:45:31 +0200
commit4388f9080ded6d4e4db9a333e94a005ba072a8cd (patch)
tree90426ff39ad7c25a237cbc301d2030019d46a14c /application/controllers
parent950dc1b7f992f2128b652bf2af4bb05c8a74bc4a (diff)
Migrate return code checks for CI3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/Main.php2
-rw-r--r--application/controllers/User.php16
-rw-r--r--application/controllers/api/v2/user.php2
-rw-r--r--application/controllers/file/Multipaste.php6
4 files changed, 13 insertions, 13 deletions
diff --git a/application/controllers/Main.php b/application/controllers/Main.php
index 2422d96bf..e7775d6d2 100644
--- a/application/controllers/Main.php
+++ b/application/controllers/Main.php
@@ -566,7 +566,7 @@ class Main extends MY_Controller {
private function _append_multipaste_queue()
{
$ids = $this->input->post_array("ids");
- if ($ids === false) {
+ if ($ids === null) {
$ids = [];
}
diff --git a/application/controllers/User.php b/application/controllers/User.php
index d87b544c7..15eab1b2f 100644
--- a/application/controllers/User.php
+++ b/application/controllers/User.php
@@ -55,7 +55,7 @@ class User extends MY_Controller {
$this->data['redirect_uri'] = $redirect_uri;
- if ($this->input->post('process') !== false) {
+ if ($this->input->post('process') !== null) {
$username = $this->input->post('username');
$password = $this->input->post('password');
@@ -82,10 +82,10 @@ class User extends MY_Controller {
$userid = $this->muser->get_userid();
$comment = $this->input->post("comment");
- $comment = $comment === false ? "" : $comment;
+ $comment = $comment === null ? "" : $comment;
$access_level = $this->input->post("access_level");
- if ($access_level === false) {
+ if ($access_level === null) {
$access_level = "apikey";
}
@@ -188,7 +188,7 @@ class User extends MY_Controller {
$this->data['redirect_uri'] = "/";
- if ($process !== false) {
+ if ($process !== null) {
$username = $this->input->post("username");
$email = $this->input->post("email");
$password = $this->input->post("password");
@@ -381,7 +381,7 @@ class User extends MY_Controller {
$userid = $query["user"];
- if ($process !== false) {
+ if ($process !== null) {
$password = $this->input->post("password");
$password_confirm = $this->input->post("password_confirm");
@@ -462,7 +462,7 @@ class User extends MY_Controller {
{
$this->muser->require_access();
- if ($this->input->post("process") !== false) {
+ if ($this->input->post("process") !== null) {
$this->_save_profile();
}
@@ -584,7 +584,7 @@ class User extends MY_Controller {
foreach (array_keys($value_processor) as $field) {
$value = $this->input->post($field);
- if ($value !== false) {
+ if ($value !== null) {
$new_value = $value_processor[$field]($value);
if ($new_value !== null) {
$data[$field] = $new_value;
@@ -619,7 +619,7 @@ class User extends MY_Controller {
$this->data["hash"] = false;
$this->data["password"] = $password;
- if ($process !== false) {
+ if ($process !== null) {
if (!$password || $password !== $password_confirm) {
$error[]= "No password or passwords don't match.";
} else {
diff --git a/application/controllers/api/v2/user.php b/application/controllers/api/v2/user.php
index 3c2eafad0..677a870c4 100644
--- a/application/controllers/api/v2/user.php
+++ b/application/controllers/api/v2/user.php
@@ -36,7 +36,7 @@ class user extends \controllers\api\api_controller {
$userid = $this->CI->muser->get_userid();
$comment = $this->CI->input->post("comment");
- $comment = $comment === false ? "" : $comment;
+ $comment = $comment === null ? "" : $comment;
$access_level = $this->CI->input->post("access_level");
$key = \service\user::create_apikey($userid, $comment, $access_level);
diff --git a/application/controllers/file/Multipaste.php b/application/controllers/file/Multipaste.php
index 50367697c..cc8ab8819 100644
--- a/application/controllers/file/Multipaste.php
+++ b/application/controllers/file/Multipaste.php
@@ -20,7 +20,7 @@ class Multipaste extends MY_Controller {
$this->muser->require_access("basic");
$ids = $this->input->post_array("ids");
- if ($ids === false) {
+ if ($ids === null) {
$ids = [];
}
@@ -58,7 +58,7 @@ class Multipaste extends MY_Controller {
$ids = $this->input->post_array('ids');
$process = $this->input->post('process');
- if ($ids === false) {
+ if ($ids === null) {
$ids = [];
}
@@ -89,7 +89,7 @@ class Multipaste extends MY_Controller {
$this->muser->require_access("basic");
$ids = $this->input->post_array('ids');
- if ($ids === false) {
+ if ($ids === null) {
$ids = [];
}