[horde] Ldap v3.0.0alpha7, kronolith and no more existent Ldap group

Torben Dannhauer torben at dannhauer.info
Fri May 16 23:13:36 UTC 2025


Hi Charles,
thanks for the patch, can you create a PR on GitHub please?
Thanks!

Torben

Von unterwegs gesendet
Sent from mobile


> Am 16.05.2025 um 19:50 schrieb Jean Charles Delépine <delepine at u-picardie.fr>:
> 
> 
> Quoting Jean Charles Delépine <delepine at u-picardie.fr>:
> 
>> Quoting Jean Charles Delépine <delepine at u-picardie.fr>:
>> 
>>> Context : one calendar shared to peoples in no more existent ldap group.
>>> 
>>> HORDE: Next TypeError: ldap_free_result(): Argument #1 ($result) must be of type LDAP\Result, bool given in /var/www/horde/vendor/horde/ldap/lib/Horde/Ldap/Search.php:123
>> 
>> For now, I just wrapped the ldap_free_result call in an if to check the type of $this->_search.
>> 
>> That said, the underlying issue is that $this->_search ends up being a boolean when searching for members of a non-existent LDAP group. So this fix avoids the error, but the real solution will be to handle that case earlier.
> 
> Here it is. In vendor/horde/kronolith/lib/Kronolith.php and vendor/horde/nag/lib/Form/Task.php.
> 
> -                    $users = array_merge(
> -                        $users,
> -                        $horde_group->listUsers($group)
> -                    );
> +                    if ($horde_group->exists($group)) {
> +                        $users = array_merge(
> +                          $users,
> +                          $horde_group->listUsers($group)
> +                );
> +                    }
> 
> Patch is attach. I will try to set a dev env in order to be able to make a PR next time.
> 
>           Jean Charles Delépine
> 
> <ldap-group.diff>
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org


More information about the horde mailing list