It happens. Just make sure to replenish everything once you get home.
My most serious bonk took me almost 1 hour to do the last 5 miles of the ride. It was awful. Nothing I could do (before cell phones) and I was on a bike path with no public transportation in sight.