Replaced deprecated function

I don't know the Symphony core well at all - and I had to change more than just the function itself to get the errors to subside, but it seems to work fine. I'm sure a Symphony veteran will know with one look if the replacement is appropriate.