aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2013-12-07 17:01:03 -0800
committerSteve Clay <steve@mrclay.org>2013-12-07 17:01:03 -0800
commit752f946f8de8660972075d6bcfe18181a450a216 (patch)
tree5f02740ead2b28bd176331bf0ec0447a4cacfa64
parent63db31c0237d24247b3b75b8365d610be936c283 (diff)
parentbeab3edd8f0b821b7e90e288add261342505321f (diff)
downloadelgg-752f946f8de8660972075d6bcfe18181a450a216.tar.gz
elgg-752f946f8de8660972075d6bcfe18181a450a216.tar.bz2
Merge pull request #6250 from edfactor/patch-1
Makes sure plugin settings functions return arrays
-rw-r--r--engine/classes/ElggPlugin.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php
index 7bf6eb1..81831d8 100644
--- a/engine/classes/ElggPlugin.php
+++ b/engine/classes/ElggPlugin.php
@@ -299,17 +299,16 @@ class ElggPlugin extends ElggObject {
$private_settings = get_data($q);
+ $return = array();
+
if ($private_settings) {
- $return = array();
-
+
foreach ($private_settings as $setting) {
$return[$setting->name] = $setting->value;
}
+ }
- return $return;
- }
-
- return false;
+ return $return;
}
/**
@@ -423,9 +422,10 @@ class ElggPlugin extends ElggObject {
$private_settings = get_data($q);
- if ($private_settings) {
- $return = array();
-
+ $return = array();
+
+ if ($private_settings) {
+
foreach ($private_settings as $setting) {
$name = substr($setting->name, $ps_prefix_len);
$value = $setting->value;
@@ -433,10 +433,9 @@ class ElggPlugin extends ElggObject {
$return[$name] = $value;
}
- return $return;
}
- return false;
+ return $return;
}
/**