From 30508b406b16d94218cf23b8720a942fd263b207 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Sun, 10 Jun 2012 17:13:03 +0530 Subject: [PATCH] [feature/postgresql-fulltext-search] assign empty stats Blank array is assigned to stats incase pgsql fulltext search backend is not compatible PHPBB3-9730 --- phpBB/includes/search/fulltext_postgres.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpBB/includes/search/fulltext_postgres.php b/phpBB/includes/search/fulltext_postgres.php index 893c87549a..00818e3353 100644 --- a/phpBB/includes/search/fulltext_postgres.php +++ b/phpBB/includes/search/fulltext_postgres.php @@ -816,6 +816,12 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base { global $db, $config; + if($db->sql_layer != 'postgres') + { + $this->stats = array(); + return; + } + $sql = "SELECT c2.relname, pg_catalog.pg_get_indexdef(i.indexrelid, 0, true) AS indexdef FROM pg_catalog.pg_class c1, pg_catalog.pg_index i, pg_catalog.pg_class c2 WHERE c1.relname = '" . POSTS_TABLE . "'