#43779 [Opn->Csd]: ldap_explode_dn returns undocumented values
| From: | vrana@php.net | Date: | Fri, 07 Nov 2008 14:08:40 +0000 |
| Subject: | #43779 [Opn->Csd]: ldap_explode_dn returns undocumented values | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-1449@lists.php.net to get a copy of this message | ||
ID: 43779
Updated by: vrana@php.net
Reported By: gabe at mudbugmedia dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
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.
"The first element in this array has count key and represents the
number of returned values, next elements are numerically indexed DN
components."
Previous Comments:
------------------------------------------------------------------------
[2008-01-07 20:50:38] gabe at mudbugmedia dot com
Description:
------------
The documentation for ldap_explode_dn says that the return value should
be "Returns an array of all DN components.". Not only is this vague (a
separate problem), it fails to document that the returned array is an
associative array where the first key/value being 'count' => (integer),
where the count is the total number of elements in the array.
Reproduce code:
---------------
$dn="cn=example,dc=example,dc=com";
var_dump(ldap_explode_dn($dn,0));
Expected result:
----------------
array(3) {
[0]=>
string(19) "cn=example"
[1]=>
string(19) "dc=example"
[2]=>
string(4) "dc=com"
}
Actual result:
--------------
array(3) {
["count"]=>
int(3)
[0]=>
string(19) "cn=example"
[1]=>
string(19) "dc=example"
[2]=>
string(4) "dc=com"
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43779&edit=1