A capacitive dropper. Very common in cheap crap. OK as long as it's done well. Sounds like yours wasn't.
There should be two resistors. One in series with the capacitor (or the input side of the bridge) to limit inrush current in case it gets switched on at a mains peak. Otherwise the zener could get overwhelmed, leading to a bangy-bangy situtation. The other should be across the capacitor, to discharge it. Otherwise you can get a belt if you unplug it at a mains peak then accidentally touch the mains pins, leading to a cursey-cursey situation.
Of course, there can be other, more serious implementation errors. Although the capacitor/zener drops the voltage down to the (say) 5V the circuit uses, one side of the circuit is still half-live (live on alternate halves of the mains cycle) or even full live. Not a problem if the thing is double insulated. There is a potential [groan] problem if the thing is only single insulated and suffers a little damage. And a big fucking problem if your circuitry is like this Double-death gay Dalek camping light (courtesy Big Clive).