Skip Menu |

This queue is for tickets about the PDF-API2 CPAN distribution.

Report information
The Basics
Id: 13272
Status: resolved
Priority: 0/
Queue: PDF-API2

Owner: Nobody in particular
Requestors: e_val [...]

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)

Subject: PDF::API2::Basic::PDF::Pages::find_prop never returns undef
Download (untitled) / with headers
text/plain 875b
Hi all, It seems that PDF::API2::Basic::PDF::Pages::find_prop method returns undef only if $self->{$prop} is explicitely set undefined. But, as can be seen from the rest of the library code (ex. PDF::API2::importpage), it is supposed to return undef not only in this case, but (more importanly) if the specified property does not exist (look at constructs like for my $k qw(MediaBox Crop Box ...) {next unless defined $s_pdf->find_prop($k)}). This leads importpage/importPageIntoForm to attempt to dreference empty "pointer" in walk_obj which causes program to stop (apparently). A mere "rturn undef;" at the end of PDF::API2::Basic::PDF::Pages::find_prop() seems to be enough to solve the issue. Tested at the following system: ActivePerl 5.8.0 (MSWin32-x86-multi-thread), PDF::API 0.41 (but the find_prop method was not changed in 0.42-0.43, so the problem is still here)

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to