Tags:
create new tag
, view all tags

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

TWiki version: TWikiAlphaRelease
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: all
Web server: all
Perl version: all
Client OS: all
Web Browser: all

-- PeterNixon - 03 Jul 2005

Impact and Available Solutions

WhatDoesItAffect: Rendering, UI
AffectedExtensions:  
AffectedReleases: latestTWikiAlphaRelease
HaveQuickFixFor: latestTWikiAlphaRelease

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

 
Topic revision: r2 - 03 Jul 2005 - 17:38:05 - WillNorris
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback