WordPress post-template null warnings

The error was occurring when someone hits a page that doesn’t exist (404). I created a custom 404 error page and the errors are now gone.

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