Module: nagvis Branch: master Commit: bc5b7726cf81734f41fb9702ce1b001dae74b236 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=bc5b7726cf81734f41fb9702ce1b001dae74b236
Author: unknown <[email protected]> Date: Fri Jul 31 13:51:54 2009 +0300 gmap: Do not try to call toXML on non-objects Signed-off-by: unknown <[email protected]> --- share/netmap/Location.php | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/netmap/Location.php b/share/netmap/Location.php index 01696e5..51fe9ea 100644 --- a/share/netmap/Location.php +++ b/share/netmap/Location.php @@ -112,7 +112,8 @@ class Location @$node->addAttribute('description', $description); // Note: @ prevents warnings when attribute value is an empty string - $object->toXML($node); + if (is_object($object)) + $object->toXML($node); $location = new Location($id, $point, $label, $address, $description, $object); @@ -150,7 +151,8 @@ class Location unset($location->hostgroup); unset($location->servicegroup); - $object->toXML($location); + if (is_object($object)) + $object->toXML($location); $success = true; break; ------------------------------------------------------------------------------ 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
