Module: nagvis Branch: nagvis-1.4 Commit: e757b60c9fd05b3235dc463f40f8bbde3d114cd2 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=e757b60c9fd05b3235dc463f40f8bbde3d114cd2
Author: LaMi <[email protected]> Date: Wed Nov 18 20:54:25 2009 +0100 Fixed problem handling empty servicegroups --- .../includes/classes/GlobalBackendndo2fs.php | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nagvis/nagvis/includes/classes/GlobalBackendndo2fs.php b/nagvis/nagvis/includes/classes/GlobalBackendndo2fs.php index abdc7bf..173d1f2 100644 --- a/nagvis/nagvis/includes/classes/GlobalBackendndo2fs.php +++ b/nagvis/nagvis/includes/classes/GlobalBackendndo2fs.php @@ -669,9 +669,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
