There has been a longstanding bug, where ubbthreads.inc.php ( lock_and_write function ) could write out a blank file for config.inc.php, as well as other files being 'edited'.
I mentioned this about 2 to 3 yrs ago and even posted a fix for it.
It never got implemented.
It has been implemented in the upcoming 7.6, however
Note to myself:
Hidden changelog tidbit.
Which BTW deserves a mention in the changelog. Since it is IMO a critical fix to the 7.x series.
To often this has happened to users in the past with no clue that the file was basically erased.