How to determine if the sidebar is empty? Or not active?

Try is_active_sidebar

if ( is_active_sidebar('your-sidebar-i.d'))

Where your-sidebar-i.d equals the I.D you use when you register the sidebar.

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