プロジェクト

全般

プロフィール

Vote #62811

完了

NoMethodError in SearchController

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Search engine_16
対象バージョン:
開始日:
2008/03/10
期日:
進捗率:

0%

予定工数:
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:
ステータス-->[Closed]

説明

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
--------------------------------------------------------------------------------

Admin Redmine さんがほぼ2年前に更新

  • カテゴリSearch engine_16 にセット
  • 対象バージョン0.7_1 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0