You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FixGH-17280: ldap_search() fails when $attributes array has holes (#17284)
We relax the constraint that the array must be a list. What really
matters is that it only has numeric keys. As shown in the example code,
it's really easy to accidentally create a non-list array, so it makes
sense to relax the constraint.
There are 3 cases left where the array is checked to be a list,
in php_ldap_do_search, but I believe this makes sense to keep because
the indices of those arrays have a meaning because they should match
between different arrays. In that case it will prevent programmer
errors.
ValueError: ldap_modify_batch(): Argument #2 ($dn) must not contain any null bytes
259
246
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) must not be empty
260
-
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) must be a list
261
-
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) must be a list
247
+
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) must be an array with numeric keys
248
+
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) a modification entry must only contain the keys "attrib", "modtype", and "values"
262
249
TypeError: ldap_modify_batch(): Argument #3 ($modifications_info) must only contain arrays
263
250
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) a modification entry must not contain the "values" option when option "modtype" is LDAP_MODIFY_BATCH_REMOVE_ALL
264
251
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) a modification entry must only contain the keys "attrib", "modtype", and "values"
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) a modification entry must contain the "values" option when the "modtype" option is not LDAP_MODIFY_BATCH_REMOVE_ALL
271
258
TypeError: ldap_modify_batch(): Argument #3 ($modifications_info) the value for option "values" must be of type array, string given
272
259
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) the value for option "values" must not be empty
273
-
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) the value for option "values" must be a list
274
-
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) the value for option "values" must be a list
260
+
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) the value for option "values" must be an array with numeric keys
275
261
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) a modification entry must contain the "attrib" option
276
262
ValueError: ldap_modify_batch(): Argument #3 ($modifications_info) a modification entry must contain the "modtype" option
0 commit comments