#34764 [NEW]: Acc. to the manual exif_read_data() should always return an array, it doesn't
| From: | avarab at gmail dot com | Date: | Thu, 06 Oct 2005 16:34:09 +0000 |
| Subject: | #34764 [NEW]: Acc. to the manual exif_read_data() should always return an array, it doesn't | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969370483@lists.php.net to get a copy of this message | ||
From: avarab at gmail dot com
Operating system: GNU/Linux
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Acc. to the manual exif_read_data() should always return an array, it doesn't
Description:
------------
The prototype given for exif_read_data() at
http://www.php.net/exif_read_data is:
array exif_read_data ( string filename [, string sections [, bool arrays
[, bool thumbnail]]] )
According to this prototype the function should always return an array,
yet it returns false when fed with invalid input:
Reproduce code:
---------------
$ dd if=/dev/urandom of=foo count=1024
$ php -r "var_dump( exif_read_data( 'foo' ) );"
Warning: exif_read_data(foo): file not supported in Command line code on
line 1
bool(false)
Expected result:
----------------
The documentation should be updated to report that exif_read_data()
returns mixed (not array), array upon success, false upon failure.
--
Edit bug report at http://bugs.php.net/?id=34764&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34764&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34764&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34764&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34764&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34764&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34764&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34764&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34764&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34764&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34764&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34764&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34764&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34764&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34764&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34764&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34764&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34764&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34764&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34764&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34764&r=mysqlcfg