1. Connect to iTunes and backup iPhone (see "iPhone and iPod touch: About backups" for more info).
2. Use iTunes to restore the latest iPhone OS, which will correct the issue, and then you can restore the backup from step 1. For more info on restoring iPhone OS see "Updating and restoring iPhone and iPod touch software."