From 8ffa138eddca3f55e26bbf10a6a301f117b18815 Mon Sep 17 00:00:00 2001 From: Marcello Perathoner Date: Fri, 1 Sep 2023 15:08:13 +0200 Subject: [PATCH] Fix logfile spam --- plugins/cap-meta-search/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/cap-meta-search/functions.php b/plugins/cap-meta-search/functions.php index 1a47e246..7dad74be 100644 --- a/plugins/cap-meta-search/functions.php +++ b/plugins/cap-meta-search/functions.php @@ -28,7 +28,7 @@ function is_meta_search () function is_highlight () { - $highlight = $_GET[HIGHLIGHT] ?? $_GET['s']; + $highlight = $_GET[HIGHLIGHT] ?? $_GET['s'] ?? ''; return !is_admin () && !empty ($highlight); } @@ -136,7 +136,7 @@ function on_query_vars ($vars) function on_cap_meta_search_the_permalink ($permalink) { - $highlight = $_GET['fulltext'] ?? $_GET['s']; + $highlight = $_GET['fulltext'] ?? $_GET['s'] ?? ''; if (!empty ($highlight)) { return esc_attr (add_query_arg (HIGHLIGHT, $highlight, $permalink)); }