Project

General

Profile

Actions

Patch #820

closed

NoMethodError in SearchController

Added by Angel Sciortino about 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Search engine
Target version:
Start date:
2008-03-10
Due date:
% Done:

0%

Estimated time:

Description

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.


Files

Actions

Also available in: Atom PDF