diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-22 13:23:11 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-22 13:23:11 -0400 |
commit | ac1226031eb5c5f9b8fe528420483f4d8828c73d (patch) | |
tree | 9b060e17188046e3c9486ed5dad87506256975c7 /IkiWiki/Plugin/attachment.pm | |
parent | a759a864f37925e6788980ac53bd8f7c69172635 (diff) | |
download | ikiwiki-ac1226031eb5c5f9b8fe528420483f4d8828c73d.tar ikiwiki-ac1226031eb5c5f9b8fe528420483f4d8828c73d.tar.gz |
avoid uninitialised value
Diffstat (limited to 'IkiWiki/Plugin/attachment.pm')
-rw-r--r-- | IkiWiki/Plugin/attachment.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index 8f9d7f5a4..2a662c0d1 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -430,6 +430,9 @@ sub match_user ($$;@) { #{{{ if (defined $params{user} && lc $params{user} eq lc $user) { return IkiWiki::SuccessReason->new("user is $user"); } + elsif (! defined $params{user}) { + return IkiWiki::FailReason->new("not logged in"); + } else { return IkiWiki::FailReason->new("user is $params{user}, not $user"); } |