I discovered the bug when clicking the "check connection" link in the sphinx search administration page. This error ONLY occurs when the connection to searchd fails. The reason for the fatal error is that a method is called from an undefined variable on line 354 of the sphinxsearch.admin.inc file. Specifically, $sphinxsearch->GetLastError() is being invoked before $sphinxsearch has been initialized. The patch included with this bug report moves the $sphinxsearch = &sphinxsearch_get_client(); command to a earlier location in the function so that it is initialized before it is used. I have tested the code with the patch applied, and the appropriate messages are displayed even when the connection to searchd fails.
| Comment | File | Size | Author |
|---|---|---|---|
| sphinxsearch.admin_.inc_.patch | 662 bytes | cpliakas |
Comments
Comment #1
markus_petrux commentedI already noticed this when porting to D6, but forgot to patch de D5 branch. I will as soon as possible.
Thanks for reporting. :)
Comment #2
cpliakas commentedSounds good. Great job with the module! It's refreshing to see how cleanly it is coded.
Comment #3
markus_petrux commentedFixed in CVS, release 1.2 is on the go. :)
Comment #4
markus_petrux commented