Module: nagvis Branch: master Commit: a3d0baaa30179092e7207626d22a5941ef00d80e URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=a3d0baaa30179092e7207626d22a5941ef00d80e
Author: LaMi <[email protected]> Date: Wed Nov 18 20:54:25 2009 +0100 Fixed problem handling empty servicegroups --- share/server/core/classes/GlobalBackendndo2fs.php | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/share/server/core/classes/GlobalBackendndo2fs.php b/share/server/core/classes/GlobalBackendndo2fs.php index 5947268..b14f263 100644 --- a/share/server/core/classes/GlobalBackendndo2fs.php +++ b/share/server/core/classes/GlobalBackendndo2fs.php @@ -749,9 +749,11 @@ class GlobalBackendndo2fs implements GlobalBackendInterface { if(file_exists($this->pathVolatile.'/SERVICEGROUPS/'.$servicegroupName)) { $oMeta = json_decode(file_get_contents($this->pathVolatile.'/SERVICEGROUPS/'.$servicegroupName.'/META')); - foreach($oMeta->SERVICEGROUPMEMBER AS $member) { - $a = explode(';', $member); - $aReturn[] = Array('host_name' => $a[0], 'service_description' => $a[1]); + if(isset($oMeta->SERVICEGROUPMEMBER)) { + foreach($oMeta->SERVICEGROUPMEMBER AS $member) { + $a = explode(';', $member); + $aReturn[] = Array('host_name' => $a[0], 'service_description' => $a[1]); + } } } ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
