Bug: Uninitialized Value in Installed Plugins
Am testing new Cairo release and received the following error testing for
InstalledPlugins via ..bin/view/TWiki/InstalledPlugins:
view: Use of uninitialized value in concatenation (.) or string at /test/web/twiki/lib/TWiki/Plugins.pm line 427.
Am assuming this is OK, if the test for failed plugins does not generate any errors.
However, made the following updates to Plugins.pm [$VERSION = '1.025'; # TWiki production release 01 Aug 2004]:
--- Plugins.pm Mon Aug 16 21:07:37 2004
+++ Plugins.pm.new Mon Aug 16 21:13:51 2004
@@ -423,9 +423,13 @@
}
$text .= " |\n";
}
-
- $text .= "<br />\n---++ Errors\n<br />\n<verbatim>\n$initialisationErrors\n</verbatim>\n";
-
+ $text .= "<br />\n---++ Errors\n<br />\n";
+ if ( $initialisationErrors ) {
+ $text .= "<verbatim>$initialisationErrors\n</verbatim>\n";
+ }
+ else {
+ $text .= "None.\n";
+ }
return $text;
}
Test case
The previous error is generated in the
CGI-Error log of the calling web server, after submitting
http://..bin/view/Twiki/InstalledPlugins
in the browser.
Environment
--
StephenHahne - 17 Aug 2004
Follow up
Fix record
Thanks Stephen. This is now fixed and in
SVN. I am not marking this as
CairoRelease fix since it is a fix for a recent feature.
Index: Plugins.pm
===================================================================
--- Plugins.pm (revision 1718)
+++ Plugins.pm (working copy)
@@ -36,6 +36,8 @@
$VERSION = '1.025'; # TWiki production release 01 Aug 2004
+$initialisationErrors = "";
+
@registrableHandlers = ( # VERSION:
'earlyInitPlugin', # ( ) 1.020
'initPlugin', # ( $topic, $web, $user, $installWeb ) 1.000
@@ -424,7 +426,9 @@
$text .= " |\n";
}
- $text .= "<br />\n---++ Errors\n<br />\n<verbatim>\n$initialisationErrors\n</verbatim>\n";
+ my $err = $initialisationErrors;
+ $err = "None" unless $err;
+ $text .= "<br />\n---++ Errors\n<verbatim>\n$err\n</verbatim>\n";
return $text;
}
--
PeterThoeny - 17 Aug 2004