[imapfilter-devel] Re: can't solve "table expected, got nil"
David DeSimone
fox at verio.net
Fri Aug 13 22:09:40 EEST 2004
Joel CARNAT <joel at carnat.net> wrote:
>
> imapfilter: /home/jcarnat/.imapfilter/config.lua:105: table expected, got nil
> I just can't get what this means.
The match() routine returns nil when there are no results found. You
will want to check for this case before passing the results to another
function.
> results = match(admin, 'INBOX', nagios)
> move(admin, 'INBOX', admin, 'nagios', results)
You should rewrite it like this:
results = match(admin, 'INBOX', nagios)
if (results ~= nil)
then
move(admin, 'INBOX', admin, 'nagios', results)
end
--
David DeSimone || Network Admin || fox at verio.net
"It took me fifteen years to discover that I had no
talent for writing, but I couldn't give it up because
by that time I was too famous. -- Robert Benchley
More information about the Imapfilter-devel
mailing list