Closed
Bug 489399
Opened 15 years ago
Closed 15 years ago
Searching for "0" is treated like an empty string
Categories
(support.mozilla.org :: General, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
1.0.2
People
(Reporter: krupa.mozbugs, Assigned: paulc)
References
()
Details
(Whiteboard: sumo_only)
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
Updated•15 years ago
|
Assignee: nobody → paul.craciunoiu
Assignee | ||
Comment 2•15 years ago
|
||
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
Closed: 15 years ago
Resolution: --- → FIXED
Comment 3•15 years ago
|
||
Where was the patch?
Assignee | ||
Comment 4•15 years ago
|
||
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.
Assignee | ||
Comment 5•15 years ago
|
||
Oops, I mean both return FALSE on NULL :)
Reporter | ||
Comment 6•15 years ago
|
||
Searching for "0" returns the result: search results for "0" No pages matched the search criteria Marking this as verified
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•