Forget jail ... Nickelodeon star Cody Longo -- from "Hollywood Heights" -- just got the book thrown at him in his DUI case ... in the form of something far worse than lockup ... BOOZE CLASSES.
As we reported, cops pulled 25-year-old Longo over in June after he repeatedly flashed another driver with his high beams. Officers determined Longo was under the influence and the actor was placed under arrest.
Longo was charged with two counts of DUI following the arrest -- but according to new court docs, he struck a plea deal that would allow him to avoid jail.
The catch ... Longo agreed to plead no contest to one count of DUI, and was sentenced to something much worse (in our opinion).
According to the plea deal, Longo was ordered to complete 3 months of alcohol education classes. He was also ordered to attend 10 AA classes and was placed on 3 years summary probation.
It might not sound that bad, but you've obviously never been to alcohol education classes. BOOORINGGGG.