]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/attachment.pm
undef $fh before opening
[git.ikiwiki.info.git] / IkiWiki / Plugin / attachment.pm
index ed1cd61fe567c3d5cf845e5c647850de8556aa26..53d826178891a901bb1750949d2abaf638bcc693 100644 (file)
@@ -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: $!");
                                }
                        }