Skip to content

Commit

Permalink
Fix logfile spam
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelloPerathoner committed Sep 1, 2023
1 parent d23e194 commit 8ffa138
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/cap-meta-search/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit 8ffa138

Please sign in to comment.