Hi there, I'm using the Debian php5-xapian package version 1.0.7-3~bpo40+1 and I'm getting this error: Fatal error: No matching function for overloaded 'TermGenerator_index_text' in /usr/share/php/xapian.php on line 1498 The code around it (in xapian.php) is this: function index_text($text,$weight=1,$prefix=null) { switch (func_num_args()) { case 1: case 2: TermGenerator_index_text($this->_cPtr, $text,$weight); break; default: TermGenerator_index_text($this->_cPtr,$text, $weight,$prefix); } } Line 1498 is the one with "case 1: case 2:". The call to that function (index_text()) in my PHP script is actually made (in this case) with 2 parameters from my PHP script: - one empty string - 1 I understand that it's wrong to send an empty string as first parameter if that's supposed to be the text we want to index, but is it necessary to trigger a fatal error ? (the message is not very explicit either...) Cheers, Yannick
On Sun, Aug 31, 2008 at 07:37:24PM -0500, Yannick Warnier wrote:> Fatal error: No matching function for overloaded > 'TermGenerator_index_text' in /usr/share/php/xapian.php on line 1498 > > case 1: case 2: TermGenerator_index_text($this->_cPtr, > $text,$weight); break; > > The call to that function (index_text()) in my PHP script is actually > made (in this case) with 2 parameters from my PHP script: > - one empty string > - 1Is it definitely 1 and not "1"? That would trigger this, because the bindings (I believe) are fairly type strict here. (In general they have to be in order to get overloaded function calls to work sanely.) Try also just dropping the $weight parameter, to ensure that $text is really a string, and not something that tests == in PHP to "" such as NULL, 0 etc.. J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james at tartarus.org uncertaintydivision.org