This happened to my friends car which was sitting in a garage for almost 3 years undriven. No jacks had touched it as it was on stands no where near where it broke. We finally got his stuff all together and went to bleed the brakes and soaked the floor. Sometimes they just rot out. Luckily his wasnt while driving so we just replaced the line. I was always paranoid about running new brake lines thinking they were hard to do and expensive. Ended up being very easy. Glad you survived haha.