Empty search query causes PHP warning

RESOLVED FIXED in 5.0.4

Status

addons.mozilla.org Graveyard
Public Pages
RESOLVED FIXED
9 years ago
2 years ago

People

(Reporter: wenzel, Assigned: cesar)

Tracking

unspecified
5.0.4

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
The search component has unclean code that does not handle an empty query being supplied:

[Fri Mar 13 02:06:44 2009] [error] [client 10.2.81.101] PHP Warning:  implode() [<a href='function.implode'>function.implode</a>]: Bad arguments. in /data/www/addons.mozilla.org-remora/site/app/controllers/components/search.php on line 191, referer: https://addons.mozilla.org/it/firefox/search?q=&cat=all

[Fri Mar 13 02:09:15 2009] [error] [client 10.2.81.103] PHP Notice:  Undefined variable: _termarray in /data/www/addons.mozilla.org-remora/site/app/controllers/components/search.php on line 191, referer: https://addons.mozilla.org/en-US/firefox/search?q=&cat=all&show=100&page=3
(Assignee)

Comment 1

9 years ago
Created attachment 370926 [details] [diff] [review]
w00t

This turned out to be easy because an empty search is to return all addons :D
Assignee: nobody → cdolivei.bugzilla
Status: NEW → ASSIGNED
Attachment #370926 - Flags: review?(fwenzel)
(Reporter)

Comment 2

9 years ago
Comment on attachment 370926 [details] [diff] [review]
w00t

Wfm. Though I am not sure returning all add-ons is the best alternative, it's certainly a valid one.

Thanks!
Attachment #370926 - Flags: review?(fwenzel) → review+
(Assignee)

Comment 3

9 years ago
In r24156
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Keywords: push-needed
Resolution: --- → FIXED
Keywords: push-needed
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.