Oliver Albers wrote:
simp Thu Oct 6 13:05:56 2005 EDT
Modified files: /phpdoc/en/reference/exif/functions
exif-read-data.xml Log:
Bug #34764: returns mixed
This bug is bogus IMHO, in section Return values it is mentioned that on
failure the function return false.
[...]
<methodsynopsis>
- <type>array</type><methodname>exif_read_data</methodname>
+ <type>mixed</type><methodname>exif_read_data</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>sections</parameter></methodparam>
<methodparam
choice="opt"><type>bool</type><parameter>arrays</parameter></methodparam>
AFAIR we had the decision, that the prototype should be the "main" type
returned on success. "mixed" would be, returns eg. array or string and
false on failure.
Please revert your commit and mark that bug bogus.
Yep.
Quoting http://doc.php.net/php/dochowto/chapter-conventions.php :
"Do not use mixed, if the return value is of a certain (not boolean) type,
and FALSE only on error. Provide the primary return type as the return type
of the function, and write down in the explanation, that it returns FALSE on
error. Use &return.success; if the function returns TRUE on success, and
FALSE on failure. "
And BTW, the protos are now semi-automatically updated by Jakub's script.
Nuno