For the World is Hollow and I Have Touched the Sky - S3-E8
Corrected entry: Spock says the planet is a spaceship and making corrections in its flight, later he states that it is on a collision course with Daren 5 planet, but if it can make corrections it should avoid the collision.
Correction: The ship was originally on a crash course with Daran V but Spock discovered that the Oracle computer that runs the ship had a faulty part that caused it to change course.