From f156308aef6fc025237b2d021eea826feea4ce80 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Jul 2008 09:40:46 -0400 Subject: attachment: Fix an uninitialised value warning when editing a page that currently has no attachments. --- IkiWiki/Plugin/attachment.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index cb762e453..90e0f0f0b 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -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 { -- cgit v1.2.3