Are your brake lights working or not?
if they are, consider the comments at
http://www.nmia.com/~dgnrg/page_25.htm which also tell how to replace the switch, but have this info too:
"Other causes of "Brake Light Circuit" error can be brass or other non-BMW brake light bulbs. I recommend using the OEM (Osram) nickel bulbs. Check the bulbs to see if they have dirty or corroded sockets & clean accordingly (Stabilant 22a here too). Also, check fuses & the "mustard relay" (88-91 models), and the LKM for later models. What has happened is the check control has sensed an increased resistance in the circuit which is above its tolerance level & trips the fault. The points in the switch are the weak link in this circuit (aside from a burned out bulb or blown fuse) and are prone to arching & with each arc, the resistivity of the contacts is affected until the situation degrades to the point of precipitating the message. I might add that this is the fourth time this switch has been replaced or repaired in my car."
In my case i have had this warning problem intermittently for years; maybe it is weather-related ... i thought maybe when it is cool and damp, but that's what it's like these days, and the problem has not returned.