From: Lucas Cimon Date: Sun, 6 Aug 2017 19:26:37 +0000 (+0200) Subject: Adding missing empty() as spotted in #889 code review X-Git-Tag: v0.9.1~1^2~5^2 X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=commitdiff_plain;h=d1b69e6af13aea6444a515e20029b6b50e688e17 Adding missing empty() as spotted in #889 code review --- diff --git a/index.php b/index.php index 9025df58..82a92473 100644 --- a/index.php +++ b/index.php @@ -1021,7 +1021,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) // -------- User wants to see only untagged links (toggle) if (isset($_GET['untaggedonly'])) { - $_SESSION['untaggedonly'] = !$_SESSION['untaggedonly']; + $_SESSION['untaggedonly'] = !empty($_SESSION['untaggedonly']); if (! empty($_SERVER['HTTP_REFERER'])) { $location = generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('untaggedonly'));