]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/attachment.pm
attachment: Fix an uninitialised value warning when editing a page that currently...
[ikiwiki.git] / IkiWiki / Plugin / attachment.pm
index cb762e453e9f92c368fed3784c1ad5820455e6f6..90e0f0f0b1e7b8e419cf1d1679d751d10a8e54b6 100644 (file)
@@ -34,7 +34,8 @@ sub formbuilder_setup (@) { #{{{
                # Start with the attachments interface toggled invisible,
                # but if it was used, keep it open.
                if ($form->submitted ne "Upload Attachment" &&
-                   ! length $q->param("attachment_select")) {
+                   (! defined $q->param("attachment_select") ||
+                   ! length $q->param("attachment_select"))) {
                        $form->tmpl_param("attachments-class" => "toggleable");
                }
                else {