|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58192 getFilename returns an empty string
Submitted: 2008-05-10 21:03 UTC Modified: 2008-05-10 21:10 UTC
From: me at benlake dot org Assigned:
Status: Not a bug Package: imagick (PECL)
PHP Version: 5.2.6 OS: Mac OSX Leopard
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
8 + 4 = ?
Subscribe to this entry?

 [2008-05-10 21:03 UTC] me at benlake dot org
I am running PHP 5.2.6 BTW, it wasn't listed.

imagick module => enabled
imagick module version => 2.1.1
imagick classes => Imagick, ImagickDraw, ImagickPixel, 
imagick.locale_fix => 0 => 0

Used getFilename as illustrated below and didn't get what I 
was expecting, which is the name of the file represented by 
the current wand.

If I am using this incorrectly then I suppose the only means 
of knowing which file is being worked on would be to 
instantiate an Imagick object for each file and not use the 
convenient batching method supported by the constructor and 
employed in the examples on

Reproduce code:
$magick = new Imagick(glob(PATH.'*.{jpg,JPG}', GLOB_BRACE));
foreach ($magick as $img)
    print $img->getFilename()."\n";

Expected result:

Actual result:
<empty string>
<empty string>
<empty string>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-10 21:07 UTC] me at benlake dot org
Updating OS and PHP version
 [2008-05-10 21:10 UTC] me at benlake dot org
getImageFilename ... apologies
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Sep 21 16:01:24 2020 UTC