Error thrown

Cannot use object of type WP_Query as array