aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-08 09:40:46 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-08 09:40:46 -0400
commitf156308aef6fc025237b2d021eea826feea4ce80 (patch)
treef3274afd892ab5db97246b68d96524c30c668212
parenteb4a6fb01a5c3a61c10bb7222d718c9bb7ce2bd3 (diff)
downloadikiwiki-f156308aef6fc025237b2d021eea826feea4ce80.tar
ikiwiki-f156308aef6fc025237b2d021eea826feea4ce80.tar.gz
attachment: Fix an uninitialised value warning when editing a page that currently has no attachments.
-rw-r--r--IkiWiki/Plugin/attachment.pm3
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/attachment:_failed_to_get_filehandle.mdwn2
3 files changed, 6 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 {
diff --git a/debian/changelog b/debian/changelog
index 8d404f32f..8cd0084f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ ikiwiki (2.53) UNRELEASED; urgency=low
* search: generate configuration files once only when rebuilding
(Gabriel McManus)
+ * attachment: Fix an uninitialised value warning when editing a page
+ that currently has no attachments.
-- Joey Hess <joeyh@debian.org> Mon, 07 Jul 2008 01:52:48 -0400
diff --git a/doc/bugs/attachment:_failed_to_get_filehandle.mdwn b/doc/bugs/attachment:_failed_to_get_filehandle.mdwn
index 3ce7e62ac..fadc2f87f 100644
--- a/doc/bugs/attachment:_failed_to_get_filehandle.mdwn
+++ b/doc/bugs/attachment:_failed_to_get_filehandle.mdwn
@@ -9,6 +9,8 @@ following warning:
Use of uninitialized value in length at /usr/share/perl5/IkiWiki/Plugin/attachment.pm line 36.
+> This is unrelated, I've fixed the warning message. --[[Joey]]
+
Is it Ikiwiki bug or my attachment plugin is misconfigured? --[[Paweł|ptecza]]
> Joey, please fix the colon in page name of my report. Ikiwiki sets