Heather Locklear will reportedly avoid jail time following her two arrests in 2018.

On Friday, the Melrose Place actress pleaded no contest to eight misdemeanor counts, PEOPLE confirms: five counts of battery on a peace officer, one count of battery on an emergency medical personnel, and two counts of resisting, obstructing, or delaying a peace officer.

Get push notifications with news, features and more.

According to TMZ, she has been ordered to 30 days in a residential mental health facility.

The star was sentenced to 120 days in jail, Radar Online reports, but the sentence was stayed pending the completion of the treatment program. She must enroll in a treatment program by Sept. 6, TMZ reports.

According to Radar, Locklear also will be placed on an informal three-year probation; under the terms of her sentence, she reportedly cannot consume alcohol, possess dangerous or deadly weapons, or take non-prescription medication.

A legal representative for Locklear did not immediately respond to PEOPLE’s request for comment.

In late February 2018, Locklear was arrested on suspicion of felony domestic battery and three counts of battery on a police officer. Police later searched her home for a firearm that was allegedly registered in her name.

Capt. Garo Kuredjian of Ventura County Sheriff’s Department told PEOPLE Locklear’s alleged threats against deputies — she verbally threatened deputies, saying she would “shoot them if they ever came to her house again,” according to the Thousand Oaks Police Department — were what prompted the search to seize the firearm, which detectives did not find.

After being accused of hitting her boyfriend, Locklear was charged with domestic abuse — but those charges were dropped in March.

That April, Locklear’s attorneys, Blair Berk and William Haney, appeared in court to plead not guilty on all five charges — four counts of misdemeanor battery on a police officer and one charge of resisting or obstructing a police officer — on behalf of the actress.

“Each of the five counts carries a maximum sentence of one year,” the Ventura County district attorney told PEOPLE at the time.

Months later, Locklear was arrested in June 2018 after she allegedly attacked the police officer and EMT who responded to a disturbance call at her residence. Police told PEOPLE that Locklear was “extremely intoxicated” and “arguing with friends and family” when they arrived.

Image zoom Tibrina Hobson/WireImage

Hours after she was released from police custody, Locklear was hospitalized for a possible overdose.

Responders were also previously dispatched to Locklear’s home a week earlier, after a call came in from the sheriff’s office for a “suicidal” person who was “violent,” according to an incident report from the Ventura County Fire Department obtained by PEOPLE.

Locklear was transported to a hospital for a psychological evaluation, TMZ reported.

She was later charged with one count of battery on a police officer, one count of battery on an EMT, and one count of resisting, obstructing or delaying a police officer. She pleaded not guilty and was due back in court in Ventura County on June 14. In late July, Ventura County Star reported that her pretrial hearing had been postponed until Aug. 16 following a hearing.

In mid-May, Locklear had returned to rehab and was living in an in-patient facility, a source confirmed to PEOPLE.

“She went back to rehab two weeks ago. She went back to the place she left before Christmas. She had left for three days right before Christmas and never gone back,” the source said. “Heather’s problem is she doesn’t get serious about anything,” says the source. “She was continuing to drink.”

According to the source, Locklear’s ongoing battle with substance abuse was taking a toll on her family — including 21-year-old daughter Ava, whom she shares with ex Richie Sambora.

Image zoom Michael Buckner/Getty Images

“Her issue is alcohol, pills, and her mental health. She doesn’t want anybody to hold her accountable. She has no job, nothing to keep her accountable. This has been tearing up her family. It’s been an ongoing issue for many many years. It has been horrible for Ava,” the source said.

The source added of Sambora, who was married to Locklear from 1994 to 2007: “Richie isn’t really involved anymore, though he has always been a great supporter. He has supported Ava and has always been there for Heather.”