RE: [PHP-DEV] RE: [PHP-DOC] #20822 [Com]: getimagesize() returning null instead of false

From: Date: Thu, 05 Dec 2002 12:41:36 +0000
Subject: RE: [PHP-DEV] RE: [PHP-DOC] #20822 [Com]: getimagesize() returning null instead of false
References: 1  Groups: php.dev php.doc 
Request: Send a blank email to php-dev+get-92113@lists.php.net to get a copy of this message
At 13:34 05.12.2002, John Coggeshall wrote:
The return false part is ok but why not showing the warnings from fopen? Well, the issue here is in the bugreport... It's not an issue of PHP throwing a warning when a file doesn't exist and is attempted to be opened, but it was throwing the error if the filesize was zero.. I could see that being annoying. I've got no problem leaving the warning in.... I just feel that the function should consistently return false on error. John
Ok, i just commited a patch that made *all* return values FALSE but left the messages in which i think should be discussed a little bit more. From my point of view accessing a file should result in an error if the file cannot be opened or in case of GetImageSize() a file operation cannot be executed. For example i would expect GetImageSize() to show an error if the information cannot be retrieved due to file corruptions. marcus

« previous php.dev (#92113) next »