diff options
author | zotlabs <mike@macgirvin.com> | 2019-03-17 15:49:01 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-03-17 15:49:01 -0700 |
commit | 136b2ae37f36d0b772166f7c8fac5a27b4b8a4d3 (patch) | |
tree | 60e1980a19b55136f6579ec6e8aba47f85b41497 | |
parent | 97009a27482f4a744eded54132f9067e1a2e6c80 (diff) | |
download | volse-hubzilla-136b2ae37f36d0b772166f7c8fac5a27b4b8a4d3.tar.gz volse-hubzilla-136b2ae37f36d0b772166f7c8fac5a27b4b8a4d3.tar.bz2 volse-hubzilla-136b2ae37f36d0b772166f7c8fac5a27b4b8a4d3.zip |
calling unserialize on array in util/service_class
-rwxr-xr-x | util/service_class | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util/service_class b/util/service_class index 50f01afff..b8a1f2386 100755 --- a/util/service_class +++ b/util/service_class @@ -93,7 +93,12 @@ if($argc == 1) { if(is_array(App::$config['service_class']) && App::$config['service_class']) { foreach(App::$config['service_class'] as $class=>$props) { echo "$class:\n"; - $d = unserialize($props); + + $d = ((! is_array($props)) && (preg_match('|^a:[0-9]+:{.*}$|s', $props)) + ? unserialize($props) + : $props + ); + if(is_array($d) && $d) { foreach($d as $k => $v) { echo "\t$k = $v\n"; |