#20822 [Com]: getimagesize() returning null instead of false
| From: | tit dot petric at telemach dot net | Date: | Thu, 05 Dec 2002 09:37:13 +0000 |
| Subject: | #20822 [Com]: getimagesize() returning null instead of false | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969350181@lists.php.net to get a copy of this message | ||
ID: 20822
Comment by: tit.petric@telemach.net
Reported By: tit.petric@telemach.net
Status: Assigned
Bug Type: Documentation problem
Operating System: linux
PHP Version: 4.2.3
Assigned To: john
New Comment:
didnt read the other email's :) anyway
returning false on everything and removing that E_ERROR does the trick
:)
thanks php team!
Previous Comments:
------------------------------------------------------------------------
[2002-12-05 03:34:16] tit.petric@telemach.net
unless getimagesize() started to take more than one parameter, i have
everything necessery
i pretty much get an error if the filesize of the file is 0 bytes, and
get NULL if the file is not an image (maybe i dont get it always - but
the plaintext files i tried always returned NULL for me
the manual should specify the result as NULL or FALSE, but i dont think
your comment here is correct - atleast not to my testing. perhaps if
you replace null with false, and vice versa, because i do get null with
valid parameters.
cheers
------------------------------------------------------------------------
[2002-12-05 01:42:08] iliaa@php.net
getimagesize() returns NULL only in one case and that being if invalid
parameters are passed to the functions. For example calling
getimagesize() without any parameters. Invalid files and so on, result
in the documentated FALSE return value.
------------------------------------------------------------------------
[2002-12-04 20:54:17] tit.petric@telemach.net
maybe its also worth mentioning that getimagesize() spews out an error
if the filesize() of the file is 0 bytes :/ - this isnt so nice :/
------------------------------------------------------------------------
[2002-12-04 20:47:55] tit.petric@telemach.net
cutting out from the php manual:
If accessing the filename image is impossible, or if it isn't a valid
picture, getimagesize() will return FALSE and generate a warning.
... when getimagesize() in fact returns NULL (atleast in 4.2.3 (debian
unstable tree))
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20822&edit=1