Bug: Null parameters (param1=0) don't render correctly
The loop in UI::Oops::oops which detects indexed parameters (param1,param2,...) exits prematurely when it encounters a null-value parameter.
Test case
Click on the "More topic actions" link in a topic with no revisions (e.g. never been saved, easiest in a new web).
Environment
--
PeterNixon - 03 Jul 2005
Impact and Available Solutions
Follow up
Here's a patch which may or may not work for the DEVELOP branch:
Index: lib/TWiki/UI/Oops.pm
===================================================================
--- lib/TWiki/UI/Oops.pm (revision 4500)
+++ lib/TWiki/UI/Oops.pm (working copy)
@@ -94,7 +94,7 @@
} else {
$tmplName = $query->param( 'template' );
$def = $query->param( 'def' );
- while( my $param = $query->param( 'param'.$n ) ) {
+ while( defined( my $param = $query->param( 'param'.$n ) )) {
push( @params, $param );
$n++;
}
This has already been patched on the
MultiLevelWikiWebs branch.
--
PeterNixon - 03 Jul 2005
thanks, peter. patched
SVN:Develop
r4512
--
WillNorris - 03 Jul 2005
Fix record
Discussion