ZF-10370: Wrong parameters for Exception in QueryParserContext
Description
Client code is {{$query = Zend_Search_Lucene_Search_QueryParser::parse( $querystring );}}
When {{$querystring}} begins with a Boolean keyword, such as {{or foo}}, the following error is encountered: {quote}Fatal error: Wrong parameters for Exception([string $exception [, long $code ]]) in /www/websites/emeraldview-tip/modules/emeraldview/vendors/Zend/Search/Lucene/Search/QueryParserContext.php on line 330{quote}
Not sure if it's this simple, but here's a patch:
Index: Search/QueryParserContext.php
===================================================================
--- Search/QueryParserContext.php (revision 22886)
+++ Search/QueryParserContext.php (working copy)
@@ -327,7 +327,7 @@
// $e->getMessage() . '\'.' );
// It's query syntax error message and it should be user friendly. So FSM message is omitted
require_once 'Zend/Search/Lucene/Search/QueryParserException.php';
- throw new Zend_Search_Lucene_Search_QueryParserException('Boolean expression error.', 0, $e);
+ throw new Zend_Search_Lucene_Search_QueryParserException('Boolean expression error.', 0);
}
// Remove 'only negative' conjunctions
Comments
Posted by Satoru Yoshida (satoruyoshida) on 2011-04-28T15:24:06.000+0000
It seems to be caused from ZF-8547. Q1) Do you use PHP 5.3 ? Q2) Does Zend_Exception::__construct() have 3 parameters in your environment?