浏览代码

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 16 年之前
父节点
当前提交
a7d7b954b1
共有 1 个文件被更改,包括 2 次插入2 次删除
  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) {
         if (count($subResults) == 0) {
             return array();
             return array();
-        } else if (count($subResults) == 0) {
+        } else if (count($subResults) == 1) {
             // Index is optimized (only one segment)
             // Index is optimized (only one segment)
             // Do not perform array reindexing
             // Do not perform array reindexing
             return reset($subResults);
             return reset($subResults);
@@ -1181,7 +1181,7 @@ class Zend_Search_Lucene implements Zend_Search_Lucene_Interface
 
 
         if (count($subResults) == 0) {
         if (count($subResults) == 0) {
             return array();
             return array();
-        } else if (count($subResults) == 0) {
+        } else if (count($subResults) == 1) {
             // Index is optimized (only one segment)
             // Index is optimized (only one segment)
             // Do not perform array reindexing
             // Do not perform array reindexing
             return reset($subResults);
             return reset($subResults);