http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9578

--- Comment #5 from Katrin Fischer <[email protected]> ---
Created attachment 26527
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26527&action=edit
[PASSED QA] Bug 9578 - Error when search and sort not on relevance

When searching with a sort (means not by relevance) and there is an error in
Zebra connexion (server is down or query is wrong), you get the message :
  Error : Can't call method "sort" on an undefined value at
/home/kohaadmin/src/C4/Search.pm line 405.

This patch corrects by not performing sort if no results.

Steps to reproduce the error without patch:

In OPAC go to Advanced Search
Choose "Title" in first "Search for:" end enter fgdfgdfgdggdg (Exam 70-433)
Display "More options"
Set "Sort by" to "Title (A-Z)"
Click "Search" at bootom of page

Result:
Error:
Can't call method "sort" on an undefined value at
/usr/share/kohaclone/C4/Search.pm line 430.

Test plan :
- Set OPACdefaultSortField on something else than relevance
- Perform a simple search with a wrong CCL query. For example : ccl=( and )
=> You get the messge : No results found ...

Patch behaves as expected.
Signed-off-by: Marc VĂ©ron <[email protected]>

Signed-off-by: Katrin Fischer <[email protected]>
Adds another check to prevent a bad Zebra error message.
Works as described, passes all tests and QA script.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to