Doc #78522 [Opn->Nab]: ldap_error returns null | string | bool

From: Date: Tue, 10 Sep 2019 06:57:31 +0000
Subject: Doc #78522 [Opn->Nab]: ldap_error returns null | string | bool
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16930@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78522&edit=1 ID: 78522 Updated by: requinix@php.net Reported by: imbolk at gmail dot com Summary: ldap_error returns null | string | bool -Status: Open +Status: Not a bug Type: Documentation Problem Package: Unknown/Other Function Operating System: MacOS/Linux PHP Version: 7.3.9 Block user comment: N Private report: N New Comment: https://www.php.net/manual/en/functions.internal.php > 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. Previous Comments: ------------------------------------------------------------------------ [2019-09-10 06:51:54] imbolk at gmail dot com Description: ------------ https://www.php.net/ldap_error : 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: -------------- false NULL ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78522&edit=1

« previous php.doc.bugs (#16930) next »