Check if $post_content is not empty before passing it to domDocument::loadHTML

domDocument::loadHTML will issue a (suppressed) warning if called with an empty string.
Unset  after it served its purpose