Fix notices during export

Notice: Trying to get property of non-object in /home/ess/public_html/wp-includes/general-template.php on line 1471