Ticket #71 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

yahoo7widget

Reported by: anonymous Owned by:
Priority: minor Milestone:
Component: Grabber Version: 1.x
Keywords: yahoo7widget Cc:

Description

yahoo7widget v1.98 produces the following errors

: video element: Argument "yes" isn't numeric in numeric ne (!=) at /usr/lib/perl5/vendor_perl/5.8.8/XMLTV.pm line 1654, <> line 1.
: video element: expected a Perl boolean like 0 or 1, not 'yes'
: video element: Argument "yes" isn't numeric in numeric ne (!=) at /usr/lib/perl5/vendor_perl/5.8.8/XMLTV.pm line 1654, <> line 1.
: video element: expected a Perl boolean like 0 or 1, not 'yes'
: video element: Argument "yes" isn't numeric in numeric ne (!=) at /usr/lib/perl5/vendor_perl/5.8.8/XMLTV.pm line 1654, <> line 1.
: video element: expected a Perl boolean like 0 or 1, not 'yes'

This did not occur on previous version. This is caused by line 506

$video_details{'colour'} = "yes" if $e{colour};

The colour video element needs to be 0 or 1

$video_details{'colour'} = 1 if $e{colour};

Although it ends up yes/no in the xml, XMLTV.pm wants it as a boolean

if (defined (my $val = delete $h{colour})) {
   $w->dataElement('colour', encode_boolean($val)) if $w;
...
sub encode_boolean( $ ) {
    my $v = shift;
    warn "expected a Perl boolean like 0 or 1, not '$v'\n"
      if $v and $v != 1;
    return $v ? 'yes' : 'no';
}

Change History

Changed 5 years ago by max

  • status changed from new to closed
  • resolution set to fixed

Thanks. [981].

Note: See TracTickets for help on using tickets.