made the define_groups function play nice on hhvm

This commit is contained in:
Jayme Brereton 2015-04-05 20:14:58 +09:30
parent 97d1f2790c
commit fa2e6cfa80

View File

@ -328,8 +328,12 @@ function verbose_error_handler($errno, $errstr, $errfile, $errline) {
function define_groups() {
global $config;
foreach ($config['mod']['groups'] as $group_value => $group_name)
defined($group_name) or define($group_name, $group_value, true);
foreach ($config['mod']['groups'] as $group_value => $group_name) {
$group_name = strtoupper($group_name);
if(!defined($group_name)) {
define($group_name, $group_value, true);
}
}
ksort($config['mod']['groups']);
}