From a188ba77dcaeddcff5b8d695e81266b3b7ffcf10 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 23 Jun 2014 11:38:08 -0400 Subject: [PATCH] FIX: Don't raise an exception when `last_posted_at` is nil --- lib/composer_messages_finder.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/composer_messages_finder.rb b/lib/composer_messages_finder.rb index 768bbdc762f..fa920f7f48c 100644 --- a/lib/composer_messages_finder.rb +++ b/lib/composer_messages_finder.rb @@ -133,7 +133,8 @@ class ComposerMessagesFinder return if topic.nil? || SiteSetting.warn_reviving_old_topic_age < 1 || - (topic.last_posted_at && topic.last_posted_at > SiteSetting.warn_reviving_old_topic_age.days.ago) + topic.last_posted_at.nil? || + topic.last_posted_at > SiteSetting.warn_reviving_old_topic_age.days.ago {templateName: 'composer/education', wait_for_typing: false,