Skip Menu |
 

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 117878
Status: patched
Priority: 0/
Queue: Imager

People
Owner: Nobody in particular
Requestors: TONYC [...] cpan.org
Cc:
AdminCc:

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



Subject: write_multi() calls _valid_image() on non-invocant parameters
Date: Fri, 16 Sep 2016 09:56:37 +1000
To: bug-Imager [...] rt.cpan.org
From: tonyc [...] cpan.org
Download (untitled) / with headers
text/plain 808b
In general Imager uses the _valid_image() method to check whether the image a method was called on has an actual image stored, as opposed to being an "empty" image. This is safe(ish)* for objects supplied as "$this", since it will always be an object, but write_multi() calls _valid_image() on non-invocant parameters, if these aren't objects of any sort, or aren't Imager objects then the program will crash with a Can't locate object method "_valid_image" via package "bad class name here" error. The following changes are needed: - _valid_image() should handle being called as a class method (and fail with a new error) - write_multi() should check the images provided are blessed objects and isa("Imager") before calling _valid_image() * it may have been incorrectly called as a class method


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.