]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
avoid uninitialised value
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 22 Jul 2008 17:23:11 +0000 (13:23 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 22 Jul 2008 17:23:11 +0000 (13:23 -0400)
IkiWiki/Plugin/attachment.pm

index 8f9d7f5a442c7635458c5d0e1591489797b0773c..2a662c0d12e949ae27f5ab10982e733fd0d6cee4 100644 (file)
@@ -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");
        }