[Mapbender-commits] r6723 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Aug 10 03:53:41 EDT 2010


Author: verenadiewald
Date: 2010-08-10 07:53:41 +0000 (Tue, 10 Aug 2010)
New Revision: 6723

Modified:
   trunk/mapbender/http/classes/class_wmcToXml.php
Log:
check if currentLayer->layer_parent is NULL

Modified: trunk/mapbender/http/classes/class_wmcToXml.php
===================================================================
--- trunk/mapbender/http/classes/class_wmcToXml.php	2010-08-10 07:51:35 UTC (rev 6722)
+++ trunk/mapbender/http/classes/class_wmcToXml.php	2010-08-10 07:53:41 UTC (rev 6723)
@@ -104,7 +104,6 @@
 			for ($j = 0; $j < count($currentWms->objLayer); $j++) {
 				$currentLayer = $currentWms->objLayer[$j];
 				
-					
 				$layerNode = null;
 				$found = false;
 				for ($k = 0; $k < count($overviewLayerArray); $k++) {
@@ -271,8 +270,9 @@
 		else {
 			return null;
 		}
-		if ($currentLayer->layer_parent != '') {
 
+		if ($currentLayer->layer_parent !== '' && !is_null($currentLayer->layer_parent)) {
+		
 			// Layer
 			$e_layer = $this->doc->createElement("Layer");
 			$e_layer->setAttribute("queryable", $currentLayer->layer_queryable);
@@ -301,7 +301,7 @@
 			$currentLayerTitle = $currentLayer->layer_title;
 			$e_layer_title = $this->doc->createElement("Title", $currentLayerTitle);
 			$e_layer->appendChild($e_layer_title);
-
+			
 			// Abstract
 			if ($currentWms->wms_abstract){
 				$e_layer_abstract = $this->doc->createElement("Abstract", $currentWms->wms_abstract);



More information about the Mapbender_commits mailing list