Fatal error when diagnosing sphinx searchd daemon connection

cpliakas - September 19, 2008 - 17:11
Project:Sphinx search
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

#1

markus_petrux - September 20, 2008 - 09:34
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

cpliakas - September 22, 2008 - 17:16

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

#3

markus_petrux - October 1, 2008 - 20:09
Status:reviewed & tested by the community» fixed

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

#4

markus_petrux - October 11, 2008 - 17:48
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.