Fixed php warning passing function as param by reference.