|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-09-25 07:41 UTC] mkoppanen@php.net
[2013-09-25 07:41 UTC] mkoppanen@php.net
-Status: Open
+Status: Not a bug
[2013-09-25 07:41 UTC] mkoppanen@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 17:00:01 2025 UTC |
Description: ------------ Hello, I found propably a bug. I'm using: Imagick 3.1.0RC2 When I'm trying to create object of class Imagick with file which is not an image for example file.exe or file.mwb an exception is throwing and it is OK. But when I'm trying to pass file.txt, it passes without any exception. It is also ready to return me width and height of txt file using getImageGeometry() method. It returns me 612 of width and 792 of height. I expects that will throw an exception, but it isn't Test script: --------------- $sPath = '/var/www/phpunit.txt'; try { $oImage = new \Imagick($sPath); } catch(\Exception $e) { var_dump('File is not an image'); die; } if (!$oImage->valid()) { var_dump('File is not an image'); die; } $aImage = $oImage->getImageGeometry(); var_dump($aImage); Expected result: ---------------- string 'File is not an image' (length=20) Actual result: -------------- array (size=2) 'width' => int 612 'height' => int 792