CUMBERLAND COUNTY, Pa. (WHTM)– A former Midstate police officer was sentenced Wednesday on charges of trying to buy cocaine, the Cumberland County District Attorney’s Office said.

Justin Taylor, 29, of New Cumberland, was sentenced to 18 months of probation by Judge Chryslee Peck, the DA’s Office said. His sentencing was handed to him after he pleaded guilty to misdemeanor counts of attempted drug possession and use or possession of drug paraphernalia.

Taylor was a police officer for the Harrisburg Bureau of Police but was suspended without pay after the incident.

Charges were filed after Taylor’s arrest in February for trying to buy cocaine from a person who was being investigated by the county’s Drug Task Force.

Task force officers saw Taylor arrive at the home at a specific time and then he was seen getting two glass jars with cocaine inside them.