summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Łabanowski <marcin@6irc.net>2015-04-05 20:51:51 +0200
committerMarcin Łabanowski <marcin@6irc.net>2015-04-05 20:51:51 +0200
commit8fcb9195c83fbb5d42bfaa2e17c32c98269c8fe7 (patch)
treec842f8f47c3479ceb4a4115b7bf8e2500004179d
parentc50635c70051a6343f17a30e7044071af10f7ce9 (diff)
parentfa2e6cfa800462a6913f53d5b0843d2c5070069f (diff)
Merge pull request #137 from lewdchan/master
made the define_groups function play nice on hhvm
-rwxr-xr-xinc/functions.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 2bd7fd93..676f5b68 100755
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -383,8 +383,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']);
}