Project

General

Profile

Actions

Defect #4509

closed

mail_handle.rb tries to run .match on an array

Added by Erik Ordway almost 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
2009-12-31
Due date:
% Done:

0%

Estimated time:
Resolution:
No feedback
Affected version:

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
Actions

Also available in: Atom PDF