Merge pull request #137 from lewdchan/master

made the define_groups function play nice on hhvm
This commit is contained in:
Marcin Łabanowski 2015-04-05 20:51:51 +02:00
commit 8fcb9195c8

View File

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