aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/XConfig.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-12-05 20:16:19 -0500
committerAndrew Manning <tamanning@zoho.com>2016-12-05 20:16:19 -0500
commit8ba5cbc2b99ffed424d085b6365cbc07309ad573 (patch)
tree865cdc545673e1f5781a2ec42dbb6015ac251cf2 /Zotlabs/Lib/XConfig.php
parent3b3da24823defd89f4ed256b7c45df8b71cb0627 (diff)
parentfbf13dde213dcecfdc6c6e5d95b165bb46eda85a (diff)
downloadvolse-hubzilla-8ba5cbc2b99ffed424d085b6365cbc07309ad573.tar.gz
volse-hubzilla-8ba5cbc2b99ffed424d085b6365cbc07309ad573.tar.bz2
volse-hubzilla-8ba5cbc2b99ffed424d085b6365cbc07309ad573.zip
Merge remote-tracking branch 'upstream/dev' into doco
Diffstat (limited to 'Zotlabs/Lib/XConfig.php')
-rw-r--r--Zotlabs/Lib/XConfig.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Lib/XConfig.php b/Zotlabs/Lib/XConfig.php
index 7f3d0f2cd..bf78c360f 100644
--- a/Zotlabs/Lib/XConfig.php
+++ b/Zotlabs/Lib/XConfig.php
@@ -59,16 +59,16 @@ class XConfig {
* @return mixed Stored $value or false if it does not exist
*/
- static public function Get($xchan, $family, $key) {
+ static public function Get($xchan, $family, $key, $default = false) {
if(! $xchan)
- return false;
+ return $default;
if(! array_key_exists($xchan, \App::$config))
load_xconfig($xchan);
if((! array_key_exists($family, \App::$config[$xchan])) || (! array_key_exists($key, \App::$config[$xchan][$family])))
- return false;
+ return $default;
return ((! is_array(\App::$config[$xchan][$family][$key])) && (preg_match('|^a:[0-9]+:{.*}$|s', \App::$config[$xchan][$family][$key]))
? unserialize(\App::$config[$xchan][$family][$key])