The hazards use the brake light filaments in the bulbs, not the turn signal ones. Could be a bad turn signal switch, but more likely it's a grounding issue. Start with one side at a time. Use a test light or a voltmeter and check for power at front and rear of that side. If OK, and the bulb isn't working, either the bulb, socket, or ground is bad. More often than not, it's the sockets.