It's not illegal, come time to sell tho and you tell a prospective buyer and they'd most likely walk away
As for safety/ strength, I watched something not so long back about cars repaired in this way and they behaved differently in a crash,IE they didn't crumple and absorb impact as well as they should as the amount of welding made them too STRONG!