From 09c27a6d337ca6abdd9e4a370481620b328dadf3 Mon Sep 17 00:00:00 2001
From: Guy Brand <gb@isis.u-strasbg.fr>
Date: Fri, 30 Mar 2007 23:50:42 +0200
Subject: [PATCH] Fix backlinks - See FS#1040

darcs-hash:20070330215042-19e2d-3528f2412ff044eb45158f349db5bbb5e32d907b.gz
---
 inc/fulltext.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/inc/fulltext.php b/inc/fulltext.php
index 35f789376..4049a753a 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -279,7 +279,8 @@ function ft_resultCombine($args){
     }
 
     $result = array();
-    foreach ($args[0] as $key1 => $value1) {
+    if ($array_count > 1) {
+      foreach ($args[0] as $key1 => $value1) {
         for ($i = 1; $i !== $array_count; $i++) {
             foreach ($args[$i] as $key2 => $value2) {
                 if ((string) $key1 === (string) $key2) {
@@ -288,6 +289,7 @@ function ft_resultCombine($args){
                 }
             }
         }
+      }
     }
     return $result;
 }
-- 
GitLab