Originally Posted by Chef Ron
By looking at this it looks like it was repaired before?
Yes, that certainly does look like a bad repair attempt.
It's a little hard to tell from the picture exactly what broke - the flange broke off the tank, or the pipe broke at the flange? That is a plastic tank, correct?
If the flange is left with a piece of broken pipe in it, I'd grind out the pipe and insert a new one. If the flange is broke clean off, that's going to be a tough one to fix.
Honestly, the path of least resistance with that one might be to replace the tank. Depending on the size, they aren't that expensive..