Closed kenyapcomau closed 5 years ago
perl-WWW-Mechanize-1.75
If an img element doesn't have a src url this warning is emitted:
Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.26.1/WWW/Mechanize.pm line 1217.
The line in this version is:
return if defined $p->{url_regex} && !($image->url =~ $p->{url_regex} );
It seems that the page in question uses some img elements with no src attribute but a data-image attribute which Javascript processes.
Therefore a guard condition like for alt attributes should be added.
Thanks for reporting this. We would accept a patch to fix it. :)
m.txt
Could we get a regression test for this as well?
I've grabbed this.
perl-WWW-Mechanize-1.75
If an img element doesn't have a src url this warning is emitted:
Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.26.1/WWW/Mechanize.pm line 1217.
The line in this version is:
return if defined $p->{url_regex} && !($image->url =~ $p->{url_regex} );
It seems that the page in question uses some img elements with no src attribute but a data-image attribute which Javascript processes.
Therefore a guard condition like for alt attributes should be added.