You need to add isset() to $post_data['post_title'] and post_content around line 1153
because sometimes we are trying to update a post without the title or content. We just want to update some custom fields...
So i made a form without those fields and it crashed...