summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/functions/functions_print.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index 9a225291ee..c9ef017e22 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -903,7 +903,7 @@ function write_align_with_textdir_check($t_dir, $return=false)
// the displayed string.
function highlight_search_hits($string) {
global $controller;
- if ($controller instanceof WT_Controller_Search) {
+ if ($controller instanceof WT_Controller_Search && $controller->query) {
// TODO: when a search contains multiple words, we search independently.
// e.g. searching for "FOO BAR" will find records containing both FOO and BAR.
// However, we only highlight the original search string, not the search terms.