A homeless man smashed a window at Worksop’s courthouse with a brick in a bid to get locked up and find shelter for the night.
Daniel Wilson, 46, of no fixed abode, admitted smashing the window on Sunday March 27 at 10.30pm.
David Grant, mitigating, said: “He asked police to lock him up. He was told the police station wasn’t a hotel.
“He went around the corner and broke the window and they accommodated him on that basis.
“He had nowhere to go and there was nowhere to stay.”
Mr Grant told the court that Wilson had physical problems brought on by a stroke.
The court heard Wilson had been turned away from a homeless hostel as he was in possession of a legal high.
Magistrates fined him £80 and ordered him to pay costs of £20 and a victim surcharge of £20.