Ezra Miller is clearing up their legal issues.

The star of the upcoming “The Flash” has pleaded guilty to trespassing as part of a plea deal with prosecutors in Vermont, Sky News reported.

READ MORE: Ezra Miller Called Themself ‘Jesus’ According To Bombshell New Exposé About Actor’s Troubling Behaviour

Miller had been facing charges of burglary and larceny in the case after they were alleged to have stolen bottles of alcohol from a person’s home last May.

As part of the deal, prosecutors have recommended a suspended sentence of up to 90 days, with a year of probation and a $500 fine. The sentence would be a far cry from the possible 25 years in prison they were facing under the burglary charge.

In recent years, Miller has been involved in a number of legal issues, including last year, when he pleaded no contest on a disorderly conduct charge for his disruptive behaviour at a Hawaii hotel.

Miller has also been accused of throwing a chair at a 26-year-old woman at a party, though that case remains unresolved.

READ MORE: Issa Rae Says Ezra Miller Controversy Is A ‘Microcosm’ Of Hollywood’s Lack Of Change Since #MeToo

A mother in Massachusetts was also granted a temporary restraining order against Miller, last June, when a judge found the woman’s child faced “substantial likelihood of immediate danger of harassment” from Miller.

Environmental activist Chase Iron Eyes also received an order of protection against Miller to stop the actor from contacting his 18-year-old nonbinary child.

Miller said in a statement in August, “Having recently gone through a time of intense crisis, I now understand that I am suffering complex mental health issues and have begun ongoing treatment.”