diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/controllers/Main.php | 2 | ||||
-rw-r--r-- | application/controllers/User.php | 2 | ||||
-rw-r--r-- | application/service/files.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/application/controllers/Main.php b/application/controllers/Main.php index d1b0cbbec..2cfaacb16 100644 --- a/application/controllers/Main.php +++ b/application/controllers/Main.php @@ -26,7 +26,7 @@ class Main extends MY_Controller { // Try to guess what the user would like to do. $id = $this->uri->segment(1); - if (strpos($id, "m-") === 0 && $this->mmultipaste->id_exists($id)) { + if (isset($id) && strpos($id, "m-") === 0 && $this->mmultipaste->id_exists($id)) { $this->_download(); } elseif ($id != "file" && $this->mfile->id_exists($id)) { $this->_download(); diff --git a/application/controllers/User.php b/application/controllers/User.php index 00d348240..3b5c3b7e0 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -45,7 +45,7 @@ class User extends MY_Controller { $redirect_uri = $this->input->get("redirect_uri"); $this->muser->require_session(); - if (!preg_match('/^[0-9a-zA-Z\/_-]*$/', $redirect_uri)) { + if (!isset($redirect_uri) || !preg_match('/^[0-9a-zA-Z\/_-]*$/', $redirect_uri)) { $redirect_uri = '/'; } diff --git a/application/service/files.php b/application/service/files.php index a98e0873f..a21b1d65c 100644 --- a/application/service/files.php +++ b/application/service/files.php @@ -242,7 +242,7 @@ class files { } } - $filesize = filesize($file['tmp_name']); + $filesize = isset($file['tmp_name']) ? filesize($file['tmp_name']) : 0; if ($filesize > $CI->config->item('upload_max_size')) { $error_message = "File too big"; } |