Vote #62811
完了NoMethodError in SearchController
開始日:
2008/03/10
期日:
進捗率:
0%
予定工数:
Redmineorg_URL:
category_id:
16
version_id:
1
issue_org_id:
820
author_id:
536
assigned_to_id:
0
comments:
2
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
説明
Submitting an invalid project id to a search results in a NoMethodError from a nil object.
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.active?
app/controllers/application.rb:105:in `check_project_privacy'
app/controllers/search_controller.rb:41:in `index'
This patch checks whether the project exists first, and a 404 page is displayed instead. Test included.
journals
Applies cleanly to r1212.
--------------------------------------------------------------------------------
Patch applied with slight changes in r1237 (used a before_filter instead).
Thanks
--------------------------------------------------------------------------------
いいね!0