Hi,
While trying out the A2 version of ldap_integration, I came across a slight bug in ldapdata.module. I'm not sure why it was doing this (must be particular to my setup), but line 351 of ldapdata.module is the following:
$allowed_attrs = _ldapdata_ldap_info($user, 'ldapdata_roattrs');
Line 355 expects $allowed_attrs to be an array, since it's being used as the haystack for an in_array search. However, in my setup, I don't have any read-only attributes set up, and so $allowed_attrs is coming back as a boolean. That being the case, I created a little patch that adds an "is_array" check around the foreach loop so it won't spit out a bunch of errors saying that in_array was passed the wrong type in parameter 2 (like I was getting).
Cheers,
Dave
(This is, btw, my first attempt at making a patch, and it looked ok to me, so hopefully it is)
| Comment | File | Size | Author |
|---|---|---|---|
| ldapdata.module.patch | 1.34 KB | davedelong |
Comments
Comment #1
equipages commentedI've applied these changes to my installation and it seems to work.
Comment #2
miglius commentedI have fixed this issue in the dev version. Please, verify it.
Comment #3
miglius commentedComment #4
yesakmac commentedHate to bring this back up, but how do you apply this patch? I copy/pasted the text from lines 351 to 379 and saved it, but i'm still getting this error. (oh and the i was getting a unexpected $end error because what i think was there wasn't a an ending bracket under the line : $items[$attr_name] = $item;