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

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2005-07-03 - WillNorris
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.