diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-08 09:40:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-08 09:40:46 -0400 |
commit | f156308aef6fc025237b2d021eea826feea4ce80 (patch) | |
tree | f3274afd892ab5db97246b68d96524c30c668212 /IkiWiki | |
parent | eb4a6fb01a5c3a61c10bb7222d718c9bb7ce2bd3 (diff) |
attachment: Fix an uninitialised value warning when editing a page that currently has no attachments.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/attachment.pm | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |