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:
- no WebNotify topic is found
- 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