@mute, good that you solved the problem, but i would not edit sphinxapi.php
since more people are facing the same problem, let me post an easy to follow solution. this is what i did to solve the problem on my forums, after reading the conversation between alanjay and orban
in includes/sphinx.php, around line 44, change
from:
Code:
if ( count ( $sphinx_forumids ) > 0 ) $cl->SetFilter ( 'forumid', $sphinx_forumids );
if ( count ( $sphinx_userids ) > 0 ) $cl->SetFilter ( 'postuserid', $sphinx_userids );
to
Code:
if ( count ( $sphinx_forumids ) > 0 ) $cl->SetFilter ( 'forumid', intvalarray($sphinx_forumids) );
if ( count ( $sphinx_userids ) > 0 ) $cl->SetFilter ( 'postuserid', intvalarray($sphinx_userids) );
around line 69, change
from
Code:
if ( count ( $sphinx_forumids ) > 0 ) $cl->SetFilter ( 'forumid', $sphinx_forumids );
if ( count ( $sphinx_threadids ) > 0 ) $cl->SetFilter ( 'threadid', $sphinx_threadids );
if ( count ( $sphinx_userids ) > 0 ) $cl->SetFilter ( 'userid', $sphinx_userids );
if ( count ( $sphinx_postuserids ) > 0 ) $cl->SetFilter ( 'postuserid', $sphinx_postuserids );
to
Code:
if ( count ( $sphinx_forumids ) > 0 ) $cl->SetFilter ( 'forumid', intvalarray($sphinx_forumids) );
if ( count ( $sphinx_threadids ) > 0 ) $cl->SetFilter ( 'threadid', intvalarray($sphinx_threadids) );
if ( count ( $sphinx_userids ) > 0 ) $cl->SetFilter ( 'userid', intvalarray($sphinx_userids) );
if ( count ( $sphinx_postuserids ) > 0 ) $cl->SetFilter ( 'postuserid', intvalarray($sphinx_postuserids) );
and lastly, around line 157, right at the end of the file, change
from
Code:
unset($cl, $res, $doc, $docinfo);
?>
to
Code:
unset($cl, $res, $doc, $docinfo);
// these functions added by me on 16 nov 06 to avoid assert failed errors from sphinxapi.php
function intvalarray($thearray)
{
array_walk($thearray, "intvalitem");
return $thearray;
}
function intvalitem(&$item, $key)
{
$item = intval($item);
}
?>