diaspora/diaspora — pull request #4961 by Zauberstuhl (2014-05-16 12:33:31+00:00)
Title: Do not try to render post/comment report which does not exist

Fixes diaspora/diaspora#4959

```bash
Started GET "/report" for 213.245.69.149 at 2014-05-15 21:54:45 +0200
Processing by ReportController#index as HTML
Rendered admins/_admin_bar.haml (3.0ms)
Rendered report/index.html.haml within layouts/centered_with_header_with_footer (19.3ms)
Completed 500 Internal Server Error in 39.7ms

ActionView::Template::Error (undefined method `message' for nil:NilClass):
9: - username = User.find_by_id(r.user_id).username
10: %div.content
11: %span
12: = report_content(r.item_id, r.item_type)
13: %span
14: = raw t('report.reported_label', person: link_to(username, user_profile_path(username)))
15: %span
app/helpers/posts_helper.rb:12:in `post_page_title'
app/helpers/report_helper.rb:9:in `report_content'
app/views/report/index.html.haml:12:in `block in _app_views_report_index_html_haml__129553804448285575_28538456380'
app/views/report/index.html.haml:8:in `each'
app/views/report/index.html.haml:8:in `_app_views_report_index_html_haml__129553804448285575_28538456380'
lib/rack/chrome_frame.rb:39:in `call'
lib/unicorn_killer.rb:35:in `call'
```