Steps to reproduce: 1.Log into your admin account 2.Search for "0" expected result: Articles with "0" in their content are listed in search results. actual result: -There are 1000 results listed as "100% organic software" link in footer is being indexed.
I actually think it's reading the 0 as false and treating it as an empty string. Searching for "100" returns results for "100".
Summary: Searching for "0" returns about 1000 search results as links in footer are indexed → Searching for "0" is treated like an empty string
Yes Cheng. I changed the check from empty() to isset(). That doesn't seem to cause any problems. It's only for this case. r24810 / r24811
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Where was the patch?
Laura: I could submit a patch, but the change is minor. See: http://viewvc.svn.mozilla.org/vc/projects/sumo/branches/production/webroot/tiki-newsearch.php?r1=24811&r2=24810&pathrev=24811 I changed !empty() to isset(). The difference is that isset() returns TRUE on 0, FALSE, and ''. isset() and !empty() both return TRUE on NULL.
Oops, I mean both return FALSE on NULL :)
Searching for "0" returns the result: search results for "0" No pages matched the search criteria Marking this as verified
Status: RESOLVED → VERIFIED
Part of newsearch
You need to log in before you can comment on or make changes to this bug.