|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #34764 Acc. to the manual exif_read_data() should always return an array, it doesn't
Submitted: 2005-10-06 18:34 UTC Modified: 2005-10-06 22:50 UTC
From: avarab at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: GNU/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: avarab at gmail dot com
New email:
PHP Version: OS:


 [2005-10-06 18:34 UTC] avarab at gmail dot com
The prototype given for exif_read_data() at 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

Expected result:
The documentation should be updated to report that exif_read_data() returns mixed (not array), array upon success, false upon failure.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-06 19:06 UTC]
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2005-10-06 22:50 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

A function returning false only in case of errors is consistently described with its main return type throughout the whole documentation.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jun 22 14:01:23 2021 UTC