improve test to use array rather than string
remove warning if post or page is empty