Fixing pass-by-reference exception

A recent PR is throwing a pass-by-reference exception because PHP in strict mode doesn't like it when non-variables are passed by reference.