Stupid arrest, "silly" sentence: "You can't say 'Bingo!' for six months." How far can a judge go?

So, someone must know which case it was?