Closed hNczy closed 7 years ago
in src/Objects/Ldap/Entry.php, at line (52)
i added a condition before $data[] = $attributes[$key][$i];
i replaced
$data[] = $attributes[$key][$i];
by
if(array_key_exists($i, $attributes[$key])) { $data[] = $attributes[$key][$i]; }
it works :)
Hey guys, just letting you know this repository is based on old code from Adldap2 located here:
https://github.com/Adldap2/Adldap2
This repository is very unlikely to be patched.
I configurate and connect to ldap before:
$info = $adldap->user()->info($username);
Undefined offset: 4
C:\Users\hNczy\Documents\intranet_vagrant\data\hasznaltauto-intranet\vendor\adldap\adldap\src\Objects\Ldap\Entry.php:52 C:\Users\hNczy\Documents\intranet_vagrant\data\hasznaltauto-intranet\vendor\adldap\adldap\src\Objects\Ldap\Entry.php:32 C:\Users\hNczy\Documents\intranet_vagrant\data\hasznaltauto-intranet\vendor\adldap\adldap\src\Classes\AdldapSearch.php:394 C:\Users\hNczy\Documents\intranet_vagrant\data\hasznaltauto-intranet\vendor\adldap\adldap\src\Classes\AdldapSearch.php:437 C:\Users\hNczy\Documents\intranet_vagrant\data\hasznaltauto-intranet\vendor\adldap\adldap\src\Classes\AdldapSearch.php:98 C:\Users\hNczy\Documents\intranet_vagrant\data\hasznaltauto-intranet\vendor\adldap\adldap\src\Classes\AdldapSearch.php:111 C:\Users\hNczy\Documents\intranet_vagrant\data\hasznaltauto-intranet\vendor\adldap\adldap\src\Classes\AdldapSearch.php:169 C:\Users\hNczy\Documents\intranet_vagrant\data\hasznaltauto-intranet\vendor\adldap\adldap\src\Classes\AdldapUsers.php:86 C:\Users\hNczy\Documents\intranet_vagrant\data\hasznaltauto-intranet\vendor\adldap\adldap\src\Classes\AbstractAdldapQueryable.php:115 C:\Users\hNczy\Documents\intranet_vagrant\data\hasznaltauto-intranet\tests\unit\AdldapTest.php:75
The $attributes[$key] is:
my test code is: