|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78522 ldap_error returns null | string | bool
Submitted: 2019-09-10 06:51 UTC Modified: 2019-09-10 06:57 UTC
From: imbolk at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 7.3.9 OS: MacOS/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: imbolk at gmail dot com
New email:
PHP Version: OS:


 [2019-09-10 06:51 UTC] imbolk at gmail dot com
------------ :

ldap_error ( resource $link_identifier ) : string

Test script:
 php -r '@var_dump(ldap_error(fopen("/etc/passwd", "r")));'

 php -r '@var_dump(ldap_error(1));'

Expected result:
string(0) ""
string(0) ""

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-10 06:57 UTC]
-Status: Open +Status: Not a bug
 [2019-09-10 06:57 UTC]
> Note: If the parameters given to a function are not what it expects, such as passing an array where a string is
> expected, the return value of the function is undefined. In this case it will likely return NULL but this is just
> a convention, and cannot be relied upon.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Apr 18 06:01:23 2021 UTC