After being caught red-handed in possession of both coke and Ecstasy at the end of April, Gary Dourdan's doing his best to take his lumps - the actor has pleaded guilty to two counts of felony drug possession, the Riverside court has confirmed to X17.

Initially, Dourdan had been facing three counts of possession, but Indio police later dismissed one count for heroin. He's been free ever since posting five grand in bail money, and has been directed by the courts to enroll in a drug program by June 25th.

Poor Gary - at least the bullet Warrick took at the end of last season ought to buy him plenty of time to complete his sentence!

Hopefully Gary listens up in his drug class - that list of substances he was caught with was scary!