aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-08 12:16:36 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-08 12:16:36 -0400
commit6f3c980e2b2e618eeccfd64418eb508de54982b4 (patch)
tree0682728ac0ce9579d0b36874e4410821bd1f99f3 /IkiWiki
parent6fc21e9d3d04c5bf572b7dcf3f5e6ebd1adcd457 (diff)
downloadikiwiki-6f3c980e2b2e618eeccfd64418eb508de54982b4.tar
ikiwiki-6f3c980e2b2e618eeccfd64418eb508de54982b4.tar.gz
undef $fh before opening
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/attachment.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm
index ed1cd61fe..53d826178 100644
--- a/IkiWiki/Plugin/attachment.pm
+++ b/IkiWiki/Plugin/attachment.pm
@@ -142,6 +142,7 @@ sub formbuilder (@) { #{{{
if (! defined $fh || ! ref $fh) {
# even that doesn't always work,
# fall back to opening the tempfile
+ $fh=undef;
open($fh, "<", $tempfile) || error("failed to open $tempfile: $!");
}
}