Sheffield Magistrates’ Court heard on March 19 how Richard David Gibson, aged 32, was approached by police in Sheffield who found him in possession of the class B drug.
Robert Coyne, prosecuting, said officers had cause to stop a van and the occupants were in a takeaway and when they returned police searched the vehicle and found a small amount of cannabis.
Gibson, of River Street in Rhyl, Wales, pleaded guilty to possessing cannabis after the incident in October.
Mr Coyne said Gibson is subject to a suspended prison sentence but this was imposed after the commission of the drug offence.
Gibson said his hands were sweating because he feared he was going to prison.
Magistrates sentenced Gibson to a six-month conditional discharge and ordered him to pay £85 costs and a £21 victim surcharge.