Zend Framework

Setting Zend_Search_Lucene_Interface_MultiSearcher distributor callback does not work.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.7
  • Component/s: Zend_Search_Lucene
  • Labels:
    None

Description

Setting distributor callback cannot function because of a wrong if-statement in Zend_Search_Lucene_Interface_MultiSearcher.

--- /opt/ZendFramework-1.9.5/library/Zend/Search/Lucene/MultiSearcher.php	2009-07-22 20:05:45.000000000 +0200
+++ MultiSearcher.php	2009-11-12 13:08:41.000000000 +0100
@@ -795,8 +795,10 @@
      */
     public function setDocumentDistributorCallback($callback)
     {
-    	if ($callback !== null  &&  !is_callable($callback))
-    	$this->_documentDistributorCallBack = $callback;
+    	if (($callback !== null) and (true === is_callable($callback)))
+	{
+    	    $this->_documentDistributorCallBack = $callback;
+	}
     }
 
     /**

Activity

Hide
Alexander Veremyev added a comment -

Fixed.

Show
Alexander Veremyev added a comment - Fixed.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: