Tune in to "Showbiz Tonight" at 11 p.m. ET on HLN for more on Lindsay Lohan's latest court drama.
Los Angeles (CNN) -- Lindsay Lohan's failed alcohol test last week will not be held against her because a judge did not renew a requirement that she be tested, according to a ruling in Los Angeles Thursday.
The requirements that her supervised probation include random alcohol and drug testing expired in February when she was arrested on a necklace theft charge and transferred from a Beverly Hills court to the Los Angeles airport branch, Judge Stephanie Saunter said.
"Lindsay has done nothing wrong," defense attorney Shawn Holley said after the hearing.
Contrary to what the judge and the probation officer believed until Thursday, it was not against Lohan's probation rules to drink and she did not have to submit to tests, Saunter ruled.
Lohan waited no time show she was happy with her court appearance. "Thank you to all of my fans for your support. Sending you Love and Light. xo," she wrote in a Twitter posting an hour after leaving the courthouse.
The judge told Lohan she was guilty of "extremely poor judgment" by having roof parties while on home confinement, "but poor judgment is not a violation of your probation."
Lohan failed an alcohol test administered by a probation officer last week and was ordered to go before the judge for a probation violation hearing Thursday morning. But Lohan's attorney convinced the judge the testing requirement had lapsed in February.
The actress is confined to her Venice Beach, California, home because of a jail sentence imposed by Saunter last month. But Saunter failed to renew the testing requirement when she renewed Lohan's supervised probation.
Lohan was allowed to serve a reduced sentence at home because, as a nonviolent offender, she qualified a home confinement program intended to reduce overcrowding.
"I am not happy about house arrest," Saunter said Thursday. "It was not my sentence."
The judge said she was on vacation when she saw media reports this month showing Lohan socializing on the roof of her luxury home in recent days.
"You are not to have parties," Saunter said. "I am ordering it. You can have one friend at a time. That is it."
The actress, who turns 25 on July 2, has managed to avoid more than a few days in jail despite two drunken-driving convictions, a long list of probation violations and the recent theft conviction.
"Because of budget constraints and because we're under a federal consent decree that requires us to curb our overcrowding situation, nonviolent offenders, lesser crimes, get 20% of their sentence," Los Angeles County Sheriff's spokesman Steve Whitmore said.
It is expected Lohan will be released from home confinement in early July. She then would resume work on 480 hours of community service the judge imposed.
Lohan entered drug rehab last year to avoid a jail sentence imposed by another judge. But Saunter made it clear in court last month that she didn't think drugs and alcohol were the root of Lohan's legal troubles.
"She's got other problems for which she self-medicates," Saunter said at her sentencing in May.
Lohan's four years in and out of court -- and sometimes jail -- started with two drunken-driving arrests in 2007. Since then, she's spent more than eight months in substance-abuse rehabilitation programs.
A probation report released last month said the actress "appears to be continuing to struggle with substance abuse issues."
"It would appear that the defendant's criminal conduct is increasing in seriousness and severity," the probation report said, yet it suggested she serve her sentence on probation and not in jail.
Lohan tested positive for alcohol use, a violation of probation rules, in February, the report said.
It also revealed that the drug test failure last August, which resulted in a jail sentence and court-ordered rehab, involved cocaine and amphetamines.
HLN's Selin Darkalstanian contributed to this report.
Watch Showbiz Tonight Weekdays Exclusively at 11PM ET on HLN.