Download & Extend

Fatal error when diagnosing sphinx searchd daemon connection

Project:Sphinx search
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

AttachmentSize
sphinxsearch.admin_.inc_.patch662 bytes

Comments

#1

Status:needs review» reviewed & tested by the community

I already noticed this when porting to D6, but forgot to patch de D5 branch. I will as soon as possible.

Thanks for reporting. :)

#2

Sounds good. Great job with the module! It's refreshing to see how cleanly it is coded.

#3

Status:reviewed & tested by the community» fixed

Fixed in CVS, release 1.2 is on the go. :)

#4

Status:fixed» closed (fixed)