ALanJay: I would not remove the asserts, because they might create invalid requests to the searchd. Also the being processed is a vB thing.
OK - does anyone else get "assert" warnings?
What I have done is set the warning messages off
assert_options(ASSERT_ACTIVE, 0); // 0 off or 1 on
in sphinxapi.php
As far as I can see the assert errors are generated because the asserts all check to see if things are integers and some of the input defaults are either text strings numerics or text strings.
These warnings don't seem to effect the output which seems to work pretty well. But with some of the more complex searches it is possible to produce array warning errors ie
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /includes/sphinx.php on line 125
The line there looks like
if (!can_moderate($docinfo[$sphinx_forumid_group]) AND i
n_array($docinfo[$sphinx_userid_group], $Coventry))
So this warning implies that one of the items is the wrong datatype - checking back through the code on line 34 and 50 these are set to:
We have 11,158,584 Posts and 464,239 Threads. And the main data file is a little over 4Gb in size.
It is still a work in progress but it does seem to produce the correct results
Quote:
Originally Posted by ALanJay
But with some of the more complex searches it is possible to produce array warning errors ie
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /includes/sphinx.php on line 125
The line there looks like
if (!can_moderate($docinfo[$sphinx_forumid_group]) AND i
n_array($docinfo[$sphinx_userid_group], $Coventry))
After much thought we realised that we don't use the $Coventry feature and I suspect that is the reason it does not work. As I'm not sure what $Conventry should resolve to I have removed from my implementation the whole line. It seems to say if not moderator and sent to Coventry then don't do search and as we have no people in the secodn category removing it seems to be the best short term solution.
I'm not sure if this is an issue between 3.0.x and 3.5/3.6 but thought I would share my thoughts on this as it kept me on my toes and I now have a much better understanding of the way the code works
PS the docinfo[$spinx????] elemets turn the group defaults into numerical output as required. I'm still not sure why the assert errors are being seen though will delve deeper
PPS Well after more searching and playing I am no further forward as to why the assert warning errors are occuring. Trying to force the elements to be integers with intval breaks the code so I am now with a system that seems to work but generates warning errors that I have switched off. I assume no one using 3.6 is having these issues with these assert warnings?