diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-02-25 16:33:40 +0100 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-02-25 16:33:40 +0100 |
commit | 0a98f6b878ec89be7282621192d9daf80f125e6c (patch) | |
tree | 718a4771ce1fb86931531226898b0b5d00e4a337 /include/config.php | |
parent | 34d30e4d7eb48bd801482531a0d775328bd43ab4 (diff) | |
parent | b1021df485fb6129acda5bba616bac10aea75a45 (diff) | |
download | volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.gz volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.bz2 volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.zip |
Merge pull request #1 from friendica/master
Update this fork
Diffstat (limited to 'include/config.php')
-rw-r--r-- | include/config.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/config.php b/include/config.php index bccf0737f..8d98d56fa 100644 --- a/include/config.php +++ b/include/config.php @@ -65,7 +65,7 @@ function get_config($family, $key) { if(! array_key_exists($key,$a->config[$family])) { return false; } - return ((preg_match('|^a:[0-9]+:{.*}$|s', $a->config[$family][$key])) + return ((! is_array($a->config[$family][$key])) && (preg_match('|^a:[0-9]+:{.*}$|s', $a->config[$family][$key])) ? unserialize($a->config[$family][$key]) : $a->config[$family][$key] ); @@ -174,8 +174,8 @@ function get_pconfig($uid,$family, $key, $instore = false) { if((! array_key_exists($family,$a->config[$uid])) || (! array_key_exists($key,$a->config[$uid][$family]))) return false; - - return ((preg_match('|^a:[0-9]+:{.*}$|s', $a->config[$uid][$family][$key])) + + return ((! is_array($a->config[$uid][$family][$key])) && (preg_match('|^a:[0-9]+:{.*}$|s', $a->config[$uid][$family][$key])) ? unserialize($a->config[$uid][$family][$key]) : $a->config[$uid][$family][$key] ); @@ -304,7 +304,7 @@ function get_xconfig($xchan,$family, $key) { if((! array_key_exists($family,$a->config[$xchan])) || (! array_key_exists($key,$a->config[$xchan][$family]))) return false; - return ((preg_match('|^a:[0-9]+:{.*}$|s', $a->config[$xchan][$family][$key])) + return ((! is_array($a->config[$xchan][$family][$key])) && (preg_match('|^a:[0-9]+:{.*}$|s', $a->config[$xchan][$family][$key])) ? unserialize($a->config[$xchan][$family][$key]) : $a->config[$xchan][$family][$key] ); |