[rt-devel] Dereferencing Bug in Notify.pm
Marc Beyer
marc.beyer at digitalbridges.com
Thu May 9 10:37:04 EDT 2002
Hi,
I believe there is a bug in Cc handling. This is from Notify.pm (line 39
ff):
if ( $arg =~ /\bCc\b/ ) {
#If we have a To, make the Ccs, Ccs, otherwise, promote them to To
if (@To) {
push ( @Cc, @{ $self->TicketObj->Cc->Emails } );
push ( @Cc, @{ $self->TicketObj->QueueObj->Cc->Emails } );
}
else {
push ( @Cc, @{ $self->TicketObj->CcAsString } );
push ( @To, @{ $self->TicketObj->QueueObj->Cc->Emails } );
}
}
However, the method Ticket->CcAsString (which calls on
Watchers->EmailsAsString) does not return an Array reference but rather
a plain String. Dereferencing it in the above way means that the @Cc
array does not receive any content and no Cc's are sent.
I'm a bit leery of my own finding, since this seems a fairly basic error
which I would expect to come up very often in normal usage and which
would therefore have been spotted before. But using the default
installation leads to the error for me (no Cc's are sent), whereas
removing the dereferencing like this:
else {
push ( @Cc, $self->TicketObj->CcAsString );
push ( @To, @{ $self->TicketObj->QueueObj->Cc->Emails } );
}
seems to solve the problem.
Am I on the wrong track here?
Thanks,
Marc
________________________________________________________________________
E-mail is an informal method of communication and may be subject to data corruption, interception and unauthorised amendment for which Digital Bridges Ltd will accept no liability. Therefore, it will normally be inappropriate to rely on information contained on e-mail without obtaining written confirmation.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
________________________________________________________________________
More information about the Rt-devel
mailing list