A dopey robber who was caught trying to take a knife into his court hearing after mugging a woman has been spared jail.
Stuart Cooke, 43, triggered a metal detector at Warwickshire Justice Centre as he tried to conceal the blade in his hand.
He had been attending a review with a judge to see how he was coping with a drug rehabilitation order as part of his punishment for the street robbery.
But after security guards found the knife he was arrested and charged with possessing an offensive weapon.
On Monday he admitted the charge as well as committing an offence while he was subject to a suspended sentence.
Cooke was given a 12-month community order with a rehabilitation activity for 50 days and ordered to pay £25 court costs.
Sentencing, Judge Andrew Lockhart QC said: “I have got to pass something for the breach and also something for this offence.
“You and I have worked together across the course of six months. I thought I could trust you, but you committed a silly error.
“This matter, while it is serious, was brought by you into a public place, but it was closed and you did not have any intention to use it and had had it for a legitimate purpose.”
Cooke, of Coventry, had previously pleaded guilty to robbery in April last year after mugging a woman and snatching #20 after she withdrew money from a cash machine.
He was handed a 12-month prison term suspended for 18 months, with a rehabilitation activity and a drug rehabilitation order.
But when he turned up for a review, on February 9 this year, he triggered the metal detector at the Justice Centre security desk.
Cooke, who had already been asked to remove any metal objects before going through the metal detector arch, was asked to empty his pockets for a further check.
He did so, but attempted to conceal something in his hand which, when he eventually handed it over, turned out to be a folded pocket knife.
Prosecutor Lee Sargent said the police were contacted by the security staff and when he was questioned Cooke said he had not realised it was in his pocket.
Christopher Gibbons, defending, said Cooke had been to see his ex-wife where he had used it to mend her clothes line, and he had then forgotten it was in his pocket.
Mr Gibbons said: ““The knife had been manufactured by his father, with whom he used to go carp fishing.”
He said Cooke was “an intelligent man” who had a degree in mechanical engineering from Warwick University, but had gone downhill because of heroin and cocaine, which was what had led to the robbery.
By Ben Gelblum, Ed Chatterton and Paul Beard