summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-22 13:23:11 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-22 13:23:11 -0400
commitac1226031eb5c5f9b8fe528420483f4d8828c73d (patch)
tree9b060e17188046e3c9486ed5dad87506256975c7 /IkiWiki
parenta759a864f37925e6788980ac53bd8f7c69172635 (diff)
avoid uninitialised value
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/attachment.pm3
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");
}