Issues

ZF-8293: Setting Zend_Search_Lucene_Interface_MultiSearcher distributor callback does not work.

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;
+   }
     }
 
     /**

Comments

Fixed.