From 8178b7824db05e57323b0007c7cd5e6da4c73d1b Mon Sep 17 00:00:00 2001 From: David Monllao Date: Mon, 20 Jun 2016 10:57:47 +0800 Subject: [PATCH] MDL-54963 search: Show no results --- search/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search/index.php b/search/index.php index e3399ee32e1..92a3a0c2e05 100644 --- a/search/index.php +++ b/search/index.php @@ -109,7 +109,7 @@ if ($data) { if ($errorstr = $search->get_engine()->get_query_error()) { echo $OUTPUT->notification(get_string('queryerror', 'search', $errorstr), 'notifyproblem'); -} else if (empty($results) && !empty($data)) { +} else if (empty($results->totalcount) && !empty($data)) { echo $OUTPUT->notification(get_string('noresults', 'search'), 'notifymessage'); }