Same happened to me whilst over in S Ireland trail riding. I put a cable tie around the lever and frame so the lever didn't fall out of the housing and was able to carry on riding for the day.
When we got back to base it was a relatively simple job to drill out the broken stud portion and replace it with a temporary bolt and spacer.
I got new and s/h replacement bolts in stock so PM me if you want one.
Must be a common fault,I've just repaired mine,I drilled it out and used a 10mm grade 8.8 bolt and locknut. I also had to do one of the bolts holding the footrest on the same side.