adding isset($post) conditionals to quite errors when wp_debug is on