update getGroupEnvironment to fix error in php5.3