Defect #4509

mail_handle.rb tries to run .match on an array

Added by Erik Ordway over 2 years ago. Updated over 2 years ago.

Status:Closed Start date:2009-12-31
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Email receiving
Target version:-
Affected version: Resolution:No feedback

Description

use to_s and not to_a as arrays do not have .match

/app/models/mail_handler.rb
@@ -94,9 +95,9 @@
       else
         # ignoring it
       end
-    elsif m = email.subject.match(ISSUE_REPLY_SUBJECT_RE)
+    elsif m = email.subject.to_s.match(ISSUE_REPLY_SUBJECT_RE)
       receive_issue_reply(m[1].to_i)
-    elsif m = email.subject.match(MESSAGE_REPLY_SUBJECT_RE)
+    elsif m = email.subject.to_s.match(MESSAGE_REPLY_SUBJECT_RE)
       receive_message_reply(m[1].to_i)
     else
       receive_issue

History

#1 Updated by Jean-Philippe Lang over 2 years ago

Please provide a failing test.

#2 Updated by Jean-Philippe Lang over 2 years ago

  • Status changed from New to Closed
  • Resolution set to No feedback

Also available in: Atom PDF