Skip Menu |
 

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 117878
Status: resolved
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)



MIME-Version: 1.0
X-Spam-Status: No, score=-2.417 tagged_above=-99.9 required=10 tests=[AWL=-0.516, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.001] autolearn=ham
Content-Disposition: inline
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"
Message-ID: <20160915235636.GR24909 [...] mars.tony.develop-help.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -2.417
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id D760A240353 for <cpan-bug+Imager [...] hipster.bestpractical.com>; Thu, 15 Sep 2016 19:56:47 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sdbUJ9DQUKdI for <cpan-bug+Imager [...] hipster.bestpractical.com>; Thu, 15 Sep 2016 19:56:46 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 4541F24007A for <bug-Imager [...] rt.cpan.org>; Thu, 15 Sep 2016 19:56:45 -0400 (EDT)
Received: (qmail 21618 invoked by alias); 15 Sep 2016 23:56:44 -0000
Received: from develop-help.com (HELO mars.tony.develop-help.com) (14.200.49.10) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 15 Sep 2016 16:56:42 -0700
Received: from mars.tony.develop-help.com (localhost [127.0.0.1]) by mars.tony.develop-help.com (8.14.4/8.14.4/Debian-8) with ESMTP id u8FNubfh017436 for <bug-Imager [...] rt.cpan.org>; Fri, 16 Sep 2016 09:56:37 +1000
Received: (from tony [...] localhost) by mars.tony.develop-help.com (8.14.4/8.14.4/Submit) id u8FNubV1017435 for bug-Imager [...] rt.cpan.org; Fri, 16 Sep 2016 09:56:37 +1000
Delivered-To: cpan-bug+Imager [...] hipster.bestpractical.com
User-Agent: Mutt/1.5.23 (2014-03-12)
Subject: write_multi() calls _valid_image() on non-invocant parameters
Return-Path: <tony [...] develop-help.com>
X-RT-Mail-Extension: imager
X-Original-To: cpan-bug+Imager [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Date: Fri, 16 Sep 2016 09:56:37 +1000
X-Spam-Level:
To: bug-Imager [...] rt.cpan.org
From: tonyc [...] cpan.org
X-RT-Original-Encoding: ascii
X-RT-Interface: Email
Content-Length: 808
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.