Bug #19761: Fixed PHP5 warnings about return by reference