Mailing List Archive

PHP Fatal error: Cannot unset string offsets in drivers_ldap.php on line 373
Hi,

I've just trying to connect my davical to ldap and then to manually
import groups. As this is just a testing environment, some groups did
only have a single member, so the memberUid attribute is not an array
but a string, thats what caused the error mentioned above.
I added the following code to drivers_ldap.php to work around this
issue: (code base is the 0.9.9-0 debian lenny package)

*** drivers_ldap.php.orig 2010-06-20 18:43:17.000000000 +0200
--- drivers_ldap.php 2010-06-20 18:36:30.000000000 +0200
*************** function sync_LDAP_groups(){
*** 369,374 ****
--- 369,378 ----

foreach($ldap_groups_tmp as $key => $ldap_group){
$ldap_groups_info[$ldap_group[$mapping['username']]] = $ldap_group;
+ if
(!is_array($ldap_groups_info[$ldap_group[$mapping['username']]][$mapping['members']])){
+ $l = Array("count" => 1, 0 =>
$ldap_groups_info[$ldap_group[$mapping['username']]][$mapping['members']]);
+
$ldap_groups_info[$ldap_group[$mapping['username']]][$mapping['members']] =
$l;
+ }
unset (
$ldap_groups_info[$ldap_group[$mapping['username']]][$mapping['members']]['count']
);
unset($ldap_groups_tmp[$key]);
}

Further, I'm asking myself whether it would be possible to make davical
update the group information automatically?

Regards,
M. Braun

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.morphoss.com/pipermail/davical-users/attachments/20100620/c36deddf/attachment.pgp>
-------------- next part --------------