The rocker pleaded guilty to drug charges after he allegedly overdosed on heroin in view of his 12-year-old son, reports TMZ.
Charges of child abuse and endangerment were dropped after Royer pleaded guilty to one count of being under the influence of a controlled substance.
Royer's representative said that the musician had entered rehab following the sentencing.
He was placed on formal probation and is awaiting a date to begin his sentence.
The punk rocker joined Social Distortion in 1979 and departed the band the following year to play with punk group The Adolescents. He later helped form the band D.I. in Southern California.