#43779 [NEW]: ldap_explode_dn returns undocumented values
| From: | gabe at mudbugmedia dot com | Date: | Mon, 07 Jan 2008 20:50:38 +0000 |
| Subject: | #43779 [NEW]: ldap_explode_dn returns undocumented values | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-419@lists.php.net to get a copy of this message | ||
From: gabe at mudbugmedia dot com
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: ldap_explode_dn returns undocumented values
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 bug report at http://bugs.php.net/?id=43779&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43779&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43779&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43779&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43779&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43779&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=43779&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43779&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43779&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43779&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43779&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43779&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=43779&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=43779&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43779&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43779&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43779&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43779&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43779&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43779&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43779&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43779&r=mysqlcfg