Vote #65479
完了
500 Internal Server Error is raised if add an empty comment to the news
Admin Redmine さんが3年以上前に追加.
3年以上前に更新.
説明
There is ability to add a comment to the news. And 500 Internal Server Error is rendered if adds an empty comment.
I'm using
- Redmine 0.8.4.devel.2815
- PostgreSQL 8.0.15
- Ruby 1.8.6 (2009-03-31 patchlevel 368) [i486-linux]
- Rails 2.2.2
ActionView::TemplateError (undefined method `any?' for nil:NilClass) on line #45 of app/views/news/show.rhtml:
42:
43:
<%= authoring comment.created_on, comment.author %>¶
44: <%= textilizable(comment.comments) %>
45: <% end if @comments.any? %>
46:
47:
48: <% if authorize_for 'news', 'add_comment' %>
app/views/news/show.rhtml:45
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `send'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view
....
journals
I've attached a patch for it.
--------------------------------------------------------------------------------
I can confirm the described behaviour also.
I've corrected the issue-description by wrapping the trace into @pre@-tags to prevent line-endings to be ignored. I also corrected the issue-priority.
Regards,
Mischa.
--------------------------------------------------------------------------------
Fixed in r2820.
Thanks for pointing this out.
--------------------------------------------------------------------------------
Merged in 0.8-stable in r2881.
--------------------------------------------------------------------------------