Craig Robinson by Kevin Parry/ Craig Robinson by Kevin Parry/
The Office 's Craig Robinson pleaded guilty to a felony count of possession of ecstasy in a Los Angeles court Wednesday. L.A. District Attorney spokeswoman Jane Robinson said the actor was allowed into a "drug-diversion program" by the judge, and the case will be dismissed if Robinson stays clean for 18 months and completes counseling,

People reports. A felony charge of methamphetamine possession and a misdemeanor charge of being under the influence were dropped. Robinson, best known as Darryl Philbin on NBC's The Office and currently playing in Pineapple Express, was pulled over for a traffic violation on June 29. Police officers found the drugs in his vehicle. In a statement, Robinson's attorney said the actor " really appreciates and takes seriously the opportunity which has been given to him by the court and the prosecution to have all of the charges against him dismissed, upon successful completion of a counseling program." - Adam Bryant