aboutsummaryrefslogtreecommitdiffstats
path: root/util/service_class
diff options
context:
space:
mode:
Diffstat (limited to 'util/service_class')
-rwxr-xr-xutil/service_class14
1 files changed, 9 insertions, 5 deletions
diff --git a/util/service_class b/util/service_class
index a1a172518..d3b60a2df 100755
--- a/util/service_class
+++ b/util/service_class
@@ -90,11 +90,15 @@ if($argc == 2) {
if($argc == 1) {
load_config('service_class');
- foreach($a->config['service_class'] as $class=>$props) {
- echo "$class:\n";
- $d = unserialize($props);
- foreach($d as $k => $v) {
- echo "\t$k = $v\n";
+ if(is_array($a->config['service_class']) && $a->config['service_class']) {
+ foreach($a->config['service_class'] as $class=>$props) {
+ echo "$class:\n";
+ $d = unserialize($props);
+ if(is_array($d) && $d) {
+ foreach($d as $k => $v) {
+ echo "\t$k = $v\n";
+ }
+ }
}
}
} \ No newline at end of file