PHP 8.5.0 Released!

Voting

: zero plus four?
(Example: nine)

The Note You're Voting On

ahall at mirapoint dot com
24 years ago
Couple of good error codes to get started. If you want to detect failure of ldap_add due to the record already existing, ldap_error == 0x44. This means, you can do something like:
$r = ldap_add($ds, $dn, $info);
if (!$r) {
 if (ldap_errno($ds) == 0x44) {
 // Do something about it
 } else {
 // A real failure
 }
}
Similarly, on ldap_delete, you will get a 0x20 value (No Such Object) if you try to delete something that isn't there.

<< Back to user notes page

AltStyle によって変換されたページ (->オリジナル) /