Improved error handling.
This commit is contained in:
parent
5bf96897e2
commit
dd7ed8a7ba
1 changed files with 4 additions and 1 deletions
|
@ -12,7 +12,10 @@ module Channel::Filter::Database
|
|||
filter[:match].each {|key, value|
|
||||
loop = true
|
||||
begin
|
||||
scan = mail[ key.downcase.to_sym ].scan(/#{value}/i)
|
||||
scan = []
|
||||
if mail
|
||||
scan = mail[ key.downcase.to_sym ].scan(/#{value}/i)
|
||||
end
|
||||
if match && scan[0]
|
||||
puts " matching #{ key.downcase }:'#{ mail[ key.downcase.to_sym ] }' on #{value}"
|
||||
match = true
|
||||
|
|
Loading…
Reference in a new issue