Tags:
create new tag
view all tags

Bug: Uninitialized Value When Using Mailnotify

Test case

At line 572 in the "lib/TWiki.pm" file the "param" method is being called on the "cgiQuery" object. When run from the "mailnotify" script the "cgiQuery" object never gets initialized, and the script breaks.

Fix record

From what I see in the comments, it is acceptable for this object to be uninitialized in some cases, so I simply changed the "getSkin" function that this appears in to look like this:

# =========================
sub getSkin
{
	 my $skin = "";
	 $skin = $cgiQuery->param( 'skin' ) if( $cgiQuery );
	 $skin = &TWiki::Prefs::getPreferencesValue( "SKIN" ) unless( $skin );
	 return $skin;
}

Environment

TWiki version: 8/01 (beta3)
TWiki plugins: none (std)
Server OS: Linux/x86 (Mandrake 6)
Web server: Apache
Perl version: 5.x
Client OS: Win2k, OS X
Web Browser: IE5

-- MichaelKitchin - 16 Aug 2001

I don't think that "skin" is guaranteed to always be a preference, so the case of "no skin" isn't being handled here.

-- DavidLeBlanc - 17 Aug 2001

Fixed and in TWikiAlphaRelease. Changed proposed code since logic is "use SKIN preferences in case skin cgi parameter is missing".

-- PeterThoeny - 21 Aug 2001

TopicClassification:
BugResolved
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2001-08-22 - PeterThoeny
 
  • 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.