Subject: | BuildExcerpts sometimes returns zero? |
The pod of BuildExcerpts says the method returns undef on failure and an
array on success. The method actually returns zero on failure and an
array ref on success.
I've attached a diff to take care of the return zero problem. Seems
like the pod might also be updated to specify array ref instead of array.
Subject: | sphinx.diff |
Index: Sphinx/Search.pm
===================================================================
--- Sphinx/Search.pm (revision 209)
+++ Sphinx/Search.pm (working copy)
@@ -1708,7 +1708,7 @@
$self->_Send($fp, $req);
my $response = $self->_GetResponse($fp, VER_COMMAND_EXCERPT);
- return 0 unless ($response);
+ return undef unless ($response);
my ($pos, $i) = 0;
my $res = []; # Empty hash ref