How to know if get_posts() failed?
- If there are posts, it returns an array of posts.
- If there are no posts it returns an empty array().
- If there are posts, but the querying of the database fails (and let's say, 99.999% times it returns correct, but this time it fails for some reason), it returns an empty array.