4.1 Ldap Authentication Not working

With php 7.4, the following function does not return a result. Seems to be an issue with ArrayObject not working.


    protected function _bindUser(string $username, string $password): ?ArrayAccess
        $config = $this->getConfig();
        try {
            $ldapBind = $this->_ldap->bind($config['bindDN']($username), $password);
            if ($ldapBind === true) {

                return new ArrayObject([
                    $config['fields'][self::CREDENTIAL_USERNAME] => $username,
        } catch (ErrorException $e) {

        return null;

Apparently this works, but debug() does not show ArrayObject with php 7.4