php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72905 Return value of FALSE on error is not documented
Submitted: 2016-08-20 10:58 UTC Modified: 2016-08-20 11:58 UTC
From: james at turnersoft dot co dot uk Assigned: cmb (profile)
Status: Closed Package: LDAP related
PHP Version: 7.0.10 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 - 10 = ?
Subscribe to this entry?

 
 [2016-08-20 10:58 UTC] james at turnersoft dot co dot uk
Description:
------------
---
From manual page: http://www.php.net/function.ldap-explode-dn
---

The page describes the return value of ldap_explode_dn() as an array of DN components.

This is not the only possibility - the behaviour is not documented that the function will return FALSE if passed a value that it is unable to parse.

(The function is a wrapper to OpenLDAP's ldap_explode_dn()... return value FALSE corresponds to the underlying libldap call returning NULL.)


Test script:
---------------
var_dump(ldap_explode_dn("000:cn=DESCRIPTION_0",0));


Expected result:
----------------
The documentation only mentions an array as a possible return type from this function.


Actual result:
--------------
The test script outputs "bool(false)".

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-20 11:11 UTC] requinix@php.net
-Status: Open +Status: Verified -Package: Documentation problem +Package: LDAP related
 [2016-08-20 11:57 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=339913
Log: Fix #72905: Return value of FALSE on error is not documented
 [2016-08-20 11:58 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2016-08-20 11:58 UTC] cmb@php.net
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.
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=3e54df359bb542fc20b19be1146023a05ec4d665
Log: Fix #72905: Return value of FALSE on error is not documented
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 06:01:30 2024 UTC