Listen to TMZ Report Radio on iHeartRadio

TMZ Report Radio

(TMZ) - Amanda Bynes is in such bad shape ... her doctors secretly got an order from a judge that allows them to hold her for another month ... TMZ has learned.

TMZ reports Amanda's doctors asked a judge Monday for a 30-day extension to her involuntary commitment. She's been in a psychiatric facility for the last 17 days, and if an extension wasn't granted she would have walked out the front door yesterday.

But Amanda's shrinks made a convincing case ... she is "very ill" and in no shape to care for herself. The judge agreed to the extension, according to TMZ.

What's unclear ... whether Amanda's parents will go back to court to regain a conservatorship over her. Initially TMZ reported they would seek another conservatorship, but sources tell the site they've had a change of heart. Amanda feels betrayed by them for having her committed, so controlling her would be a herculean effort.

The likely scenario is that the psychiatric hold will be extended for a long time.

Photo: Getty Images