aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-07-12 11:36:42 +0200
committerArthurHoaro <arthur@hoa.ro>2015-07-12 11:36:42 +0200
commit6ac95d9cf1459a2edada2eee323a13334e65b714 (patch)
tree5cb6f4a81400fa5285c89b60bf5ce2f5baef31d1
parent7bd3542b1b030070fa3412a2769f9632bd4e6d1b (diff)
downloadShaarli-6ac95d9cf1459a2edada2eee323a13334e65b714.tar.gz
Shaarli-6ac95d9cf1459a2edada2eee323a13334e65b714.tar.zst
Shaarli-6ac95d9cf1459a2edada2eee323a13334e65b714.zip
Fixes warning 'Undefined index: searchtags' while filtering by tags.
Happened if there were not any searchtags already present in the query.
-rw-r--r--index.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/index.php b/index.php
index 5f173f4d..a0195db7 100644
--- a/index.php
+++ b/index.php
@@ -1122,7 +1122,11 @@ function renderPage()
1122 1122
1123 // Check if this tag is already in the search query and ignore it if it is. 1123 // Check if this tag is already in the search query and ignore it if it is.
1124 // Each tag is always separated by a space 1124 // Each tag is always separated by a space
1125 $current_tags = explode(' ', $params['searchtags']); 1125 if (isset($params['searchtags'])) {
1126 $current_tags = explode(' ', $params['searchtags']);
1127 } else {
1128 $current_tags = array();
1129 }
1126 $addtag = true; 1130 $addtag = true;
1127 foreach ($current_tags as $value) { 1131 foreach ($current_tags as $value) {
1128 if ($value === $_GET['addtag']) { 1132 if ($value === $_GET['addtag']) {