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