If user base DN is not correct in configuration, we get a fatal error:
PHP message: PHP Warning: ldap_search(): Search: No such object in /usr/local/service-desk/vendor/ltb-project/ltb-common/src/Ltb/PhpLDAP.php on line 56; PHP message: PHP Fatal error: Uncaught TypeError: ldap_parse_result(): Argument #2 ($result) must be of type LDAP\\Result, false given in /usr/local/service-desk/vendor/ltb-project/ltb-common/src/Ltb/PhpLDAP.php:96\nStack trace:\n#0 /usr/local/service-desk/vendor/ltb-project/ltb-common/src/Ltb/PhpLDAP.php(96): ldap_parse_result()\n#1 /usr/local/service-desk/vendor/ltb-project/ltb-common/src/Ltb/Ldap.php(159): Ltb\\PhpLDAP::ldap_parse_result()\n#2 /usr/local/service-desk/htdocs/search.php(32): Ltb\\Ldap->search()\n#3 /usr/local/service-desk/htdocs/index.php(270): require_once('...')\n#4 {main}\n thrown in /usr/local/service-desk/vendor/ltb-project/ltb-common/src/Ltb/PhpLDAP.php on line 96', referer: https://sd.example.com/index.php?page=welcome
If user base DN is not correct in configuration, we get a fatal error:
We should catch the error.