Subject: | encode generates warnings for undefined text (includes patch) |
I'm using XML::RSS as part of a cron script, and it is generating mail to be every hour because undefined text is being passed through encode().
Changing the opening lines to encode() to look like this fixes it:
sub encode {
my ($self, $text) = @_;
return $text unless ($self->{'encode_output'} and defined $text);
(I simply added a check that is defined. If it's not, there is no point in proceeding anyway, because there is nothing to encode!)