get_posts includes “auto drafts”?

If you just want to return published posts, you can exclude the ‘post_status’ argument as by default it will just return published posts only.

Having said that, the array works for me too though.

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