Tags:
create new tag
, view all tags

Bug: Function getEmailNotifyList returns bad value

The function getEmailNotifyList() can return undef which mailnotify does not know how to deal with. This results in mailnotify trying to send email to an undefined user.

The fix is to have getEmailNotifyList() return an empty list instead of undef when:

  1. no WebNotify topic is found
  2. no users specified
either that or modify mailnotify to deal with a returned undef value.

Test case

  • Run mailnotify when there is a web that has no WebNotify page. mailnotify will attempt to send email if it detected changes in the web
  • Run mailnotify when there is a web that has a WebNotify page but no users specified in the page. mailnotify will attempt to send email if it detected changes in the web

Environment

TWiki version: TWiki 01-Sep-2001
TWiki plugins: na
Server OS: Solaris 2.6
Web server: Apache 1.3.20
Perl version: 5.6.0
Client OS: Solaris 2.6
Web Browser: Netscape 4.78

-- TaitCyrus - 30 Nov 2001

Fix record

325,326d324
<     return undef unless &TWiki::Store::topicExists( $web, $topicname );
< 
327a326,327
>     return @list unless &TWiki::Store::topicExists( $web, $topicname );
> 
333c333
<     return (scalar @list ? @list : undef);    
---
>     return (@list);

This is a duplicate of UninitializedValueInMailnotifyWithEmptyWebNotify. Thanks for reporting.

-- PeterThoeny - 30 Nov 2001

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2001-12-01 - 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.