Şu şekil denermisin.
$sorgu = $pdo->prepare("UPDATE posts SET title=?, url=?, content=?, short_content=?, category_id=?");

if (isset($_POST['image']) && !empty($_POST['image'])) {
  $sorgu = $pdo->prepare("UPDATE posts SET title=?, image=?, url=?, content=?, short_content=?, category_id=? WHERE id = ?");
  $sorgu->execute([$title, $e, $url, $content, $short_content, $category_id, $edit['id'] ]);
} else {
  $sorgu->execute([$title, $url, $content, $short_content, $category_id, $edit['id'] ]);
}