From 2c44437d40d339c90a3f1244a28ce64309ad3e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Wed, 18 Jul 2018 21:41:24 +0200 Subject: [PATCH] Fixed E_NOTICE when no 'term' was provided (#5391) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed E_NOTICE when no 'term' was provided, maybe better encapsulate this whole $_GET, $_POST and $_SESSION thing into a `Request` class? Signed-off-by: Roland Häder * Rewrote to recommendation by @MrPetovan which results in really nicer code. Signed-off-by: Roland Häder --- mod/filer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/filer.php b/mod/filer.php index 190b6f78ac..9b0017322c 100644 --- a/mod/filer.php +++ b/mod/filer.php @@ -15,7 +15,7 @@ function filer_content(App $a) killme(); } - $term = unxmlify(trim($_GET['term'])); + $term = unxmlify(trim(defaults($_GET, 'term', ''))); $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0); logger('filer: tag ' . $term . ' item ' . $item_id);