Explorar o código

Zend_Search_Lucene: minor fix. [ZF-2189] related.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17837 44c647ce-9c0f-0410-b52a-842ac1e357ba
alexander %!s(int64=16) %!d(string=hai) anos
pai
achega
a7d7b954b1
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      library/Zend/Search/Lucene.php

+ 2 - 2
library/Zend/Search/Lucene.php

@@ -1147,7 +1147,7 @@ class Zend_Search_Lucene implements Zend_Search_Lucene_Interface
 
         if (count($subResults) == 0) {
             return array();
-        } else if (count($subResults) == 0) {
+        } else if (count($subResults) == 1) {
             // Index is optimized (only one segment)
             // Do not perform array reindexing
             return reset($subResults);
@@ -1181,7 +1181,7 @@ class Zend_Search_Lucene implements Zend_Search_Lucene_Interface
 
         if (count($subResults) == 0) {
             return array();
-        } else if (count($subResults) == 0) {
+        } else if (count($subResults) == 1) {
             // Index is optimized (only one segment)
             // Do not perform array reindexing
             return reset($subResults);