note 100341 added to function.ldap-modify
| From: | think at osu1 dot php dot net | Date: | Sat, 09 Oct 2010 01:59:30 +0000 |
| Subject: | note 100341 added to function.ldap-modify | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173096@lists.php.net to get a copy of this message | ||
Two insipid little issues need to be highlighted. They were pointed out separate comments
previously, but are worth repeating:
===================================
When specifying an array for $entry, MAKE SURE its index values are CONTIGUOUS and that NO EMPTY
VALUES are present. (I didn't test whether or not associative arrays are acceptable.)
===================================
If you have an empty value in the array, you'll get an "Invalid Syntax" error (at
least with OpenLDAP libs), which is bad enough, but if you use something like array_diff() to remove
blank entries from your array, leaving a non-contiguous set of index numbers, you might get
"Success" from ldap_error() and 0 (zero) from ldap_errno(), BUT ldap_modify() will return
FALSE. Wow.
This last point may be a bug and may be version dependent (PHP or LDAP libs), but it's still
best to make sure your array index numbers are contiguous and that there are no blank entries.
----
Server IP: 64.71.164.2
Probable Submitter: 69.107.104.23
----
Manual Page -- http://www.php.net/manual/en/function.ldap-modify.php
Edit -- https://master.php.net/note/edit/100341
Del: integrated -- https://master.php.net/note/delete/100341/integrated
Del: useless -- https://master.php.net/note/delete/100341/useless
Del: bad code -- https://master.php.net/note/delete/100341/bad+code
Del: spam -- https://master.php.net/note/delete/100341/spam
Del: non-english -- https://master.php.net/note/delete/100341/non-english
Del: in docs -- https://master.php.net/note/delete/100341/in+docs
Del: other reasons-- https://master.php.net/note/delete/100341
Reject -- https://master.php.net/note/reject/100341
Search -- https://master.php.net/manage/user-notes.php