From: Roland Häder Date: Wed, 18 Jul 2018 19:41:24 +0000 (+0200) Subject: Fixed E_NOTICE when no 'term' was provided (#5391) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2c44437d40d339c90a3f1244a28ce64309ad3e34;p=friendica.git Fixed E_NOTICE when no 'term' was provided (#5391) * 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 --- 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);