I'm telling you mate - I'm 99% sure it's that function.

Are you on a shared server?
If so, I wouldn't be at all surprised to find out that your host has tweaked something in the period between your board working and failing.

Of course we can't dismiss Rubens comment about your modified code.
But I suspect that the mods were done prior to this happening, right?