| Title | Search always throws NPE |
| Date | 25-Jun-2005 01:00:28 EEST |
| Version | 2.2.27 |
| Submitter | HolgerHoffstätte |
| Bug criticality | MediumBug |
| Browser version | |
| Bug status | ClosedBug |
| PageProvider used | |
| Servlet Container | |
| Operating System | |
| URL | http://www.jspwiki.org/Search.jsp?query=&ok=Find%21![]() |
| Java version |
I just updated to the latest stable 2.2.27 and always got NPEs on search. Since the official site is suffering from the same bug I don't think I did anything wrong. ;)
Umm... Yes, don't click on "Find" if you don't have a search text typed in until then. :-)
Quick fixes:
- edit Search.jsp, fix line 50 to read:
if (list != null) log.info..
- edit scripts/search_highlight.js, insert the following in line 59 (after the existing if..continue):
if (qsip[1].length == 0) continue;
That should take care of this bug until it gets fixed for real. Btw, setting the list variable to an empty array when the search returned null is wrong since it will then always show the 'first twenty of 0 results'.
Fixed in 2.2.28.
