Re: Re: RE: [PHP-DOC] #20822 [Com]: getimagesize() returning null instead of false
| From: | (Marcus Börger) | Date: | Thu, 05 Dec 2002 14:18:45 +0000 |
| Subject: | Re: Re: RE: [PHP-DOC] #20822 [Com]: getimagesize() returning null instead of false | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-92124@lists.php.net to get a copy of this message | ||
At 15:10 05.12.2002, Derick Rethans wrote:
On Thu, 5 Dec 2002, Tit "Black" Petric wrote:image.c uses E_ERROR only if the resulting array cannot be initialized. streams.c returns E_WARNING and one E_NOTICE (in case of a wrapper failure) So GetImageSize() returns mostly E_WARNING and i assume the other two messages beeing correct. marcusI personally dissagree here - an error is a bit harsh if it doesn't hinder execution - I dont see anything in getimagesize() which should return E_ERROR - only E_NOTICE if the file is corrupt, unless I'm missing something. I'd go for an E_WARNING in case the file is corrupt. DerickFrom 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.I agree. Absolutely. Masking bona fide file operation errors would be a huge mistake, IMHO.
-- -------------------------------------------------------------------------Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/-------------------------------------------------------------------------