From 01d90e59a8c311778a832ba4920e4c5a85b1256f Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 5 Mar 2012 00:42:36 +0100 Subject: [ticket/9813] Only get posts table row count if we detected a fulltext index. PHPBB3-9813 --- phpBB/includes/search/fulltext_mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 54cc894f6a..779ec1d216 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -896,7 +896,7 @@ class fulltext_mysql extends search_backend } $db->sql_freeresult($result); - $this->stats['total_posts'] = $db->get_estimated_row_count(POSTS_TABLE); + $this->stats['total_posts'] = empty($this->stats) ? 0 : $db->get_estimated_row_count(POSTS_TABLE); } /** -- cgit v1.2.1