Closed
Description
Hey,
First of all, I am using Symfony version 3.1.3 and the LDAP Component.
When i use the native PHP var_dump(ldap_get_entries(...))
, I get this kind of data :
array (size=29)
'count' => int 28
0 =>
array (size=114)
'objectclass' =>
array (size=5)
'count' => int 4
0 => string 'top' (length=3)
1 => string 'person' (length=6)
2 => string 'organizationalPerson' (length=20)
3 => string 'user' (length=4)
0 => string 'objectclass' (length=11)
'cn' =>
array (size=2)
'count' => int 1
0 => string 'John DOE' (length=13)
1 => string 'cn' (length=2)
[...]
With using LDAP Component, i got a Warning: Illegal string offset 'count'
in vendor/symfony/symfony/src/Symfony/Component/Ldap/LdapClient.php
at line 75
. It throws it as an exception.
The component seems to expect $resultAttribute
($values
) to be an array. But in my example, it is not always the case (0 => string 'objectclass' (length=11)
, etc.).
Is a flaw/bug of the component itself or the data returned by my LDAP server are invalid ?
ping @csarrazi