aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 06a687363..e38288ac1 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -211,7 +211,7 @@
global $CONFIG;
- if (empty($register_name) || empty($subregister_name) || empty($register_array))
+ if (empty($register_name) || empty($subregister_name) || empty($children_array))
return false;
if (!isset($CONFIG->registers))
@@ -220,16 +220,16 @@
if (!isset($CONFIG->registers[$register_name]))
$CONFIG->registers[$register_name] = array();
- if (is_array($register_array)) {
- $subregister = new stdClass;
- $subregister->name = $subregister_name;
- $subregister->value = $subregister_value;
+ $subregister = new stdClass;
+ $subregister->name = $subregister_name;
+ $subregister->value = $subregister_value;
+
+ if (is_array($children_array)) {
$subregister->children = $children_array;
- $CONFIG->registers[$register_name][$subregister_name] = $subregister;
- return true;
}
- return false;
+ $CONFIG->registers[$register_name][$subregister_name] = $subregister;
+ return true;
}