After a 15-hour stint behind bars for failing another drug test, actress Lindsay Lohan posted bail and left the Los Angeles Century Regional Detention Facility just before midnight on Friday.

She had been jailed early Friday morning after a judge determined she violated her probation by having failed a drug test for cocaine, something she had also admitted in her Twitter feed last Friday.

Although Judge Eldin Fox ruled Friday morning that Lohan would have to wait nearly four weeks for a bail hearing, Judge Patricia Schnegg overturned his ruling later that evening after the troubled star's attorney filed the necessary documents.

Lohan's posted the bail of $300,000 later that evening, telling reporters that she needs rehabilitation, not jail.

Her jail stint and probation violation are just the latest in a series of drug- and alcohol-related stumbles.

Lohan was incarcerated in late July and August after violating probation on drug possession and drunk driving charges that she received three years ago. She was jailed for two weeks of a 90-day total sentence and was released early on the condition that she undergo 22 days of drug rehabilitation.

Lilo will again be wearing an alcohol-monitoring bracelet, and she is also under court order to stay out of places where alcohol is served.

Lohan's next court hearing will be October 22.