Don't use $_POST['doc_id'] as existing post ID if it's 0

Fixes #411

Props @original-brownbear