I don't think it would be different PHP versions causing this, but I've never come across this issue either. Your changes make sense, that second arguments is actually optional anyway. If you are only using a single database connection (which in your case you seem to be), it will just default to using that connection so that is why removing the 2nd argument works ok.
-justin