From 4d59c3489042bab078c4a20ecfb3fde6aeb119cc Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 10 Apr 2022 12:07:42 +0200 Subject: feat(PHP8.1): Add null-checks Signed-off-by: Florian Pritz --- application/controllers/Main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/controllers/Main.php') 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(); -- cgit v1.2.3-24-g4f1b