Database Errors since site updated to WordPress 6.4.3

The errors were generated because there was a plugin that forced sql modes to be used on the database that are actually “incompatible” with wordpress.

The following code was sadly executed for every request…

   private function set_sql_mode() : void
    {
        // Make sure no sql modes can be blocked (By wordpress built-in incompatible modes)
        add_filter('incompatible_sql_modes', fn() => [] );

        $this->DB->set_sql_mode([
            'ONLY_FULL_GROUP_BY',
            'STRICT_TRANS_TABLES',
            'NO_ZERO_IN_DATE',
            'NO_ZERO_DATE',
            'ERROR_FOR_DIVISION_BY_ZERO',
            'NO_ENGINE_SUBSTITUTION'
        ]);
    }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)