]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
rss: protect against nil field
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 21 Jan 2013 18:41:38 +0000 (19:41 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 21 Jan 2013 18:41:38 +0000 (19:41 +0100)
This happens when the filter tries to wrap a non-existing field, and in
custom filters it's probably a sign that the wrong field are being
accessed. It would probably be nicer to raise a warning about this, but
I'm too lazy to add that now.

data/rbot/plugins/rss.rb

index b2d367b0da645a4f1e4b61ad9f60712768513853..f7e559f7601ed86a10a1e17c26da681e25e812cf 100644 (file)
@@ -392,7 +392,7 @@ class RSSFeedsPlugin < Plugin
           # do nothing
         else
           warning "ignoring #{v.inspect} wrapping of unknown class"
-        end
+        end unless ss[nk].nil?
       else
         subs[k] = v
       end