[Mapbender-commits] r4668 - branches/2.6/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Sep 21 08:21:42 EDT 2009
Author: christoph
Date: 2009-09-21 08:21:41 -0400 (Mon, 21 Sep 2009)
New Revision: 4668
Modified:
branches/2.6/http/classes/class_wfs_1_1.php
Log:
Modified: branches/2.6/http/classes/class_wfs_1_1.php
===================================================================
--- branches/2.6/http/classes/class_wfs_1_1.php 2009-09-21 09:40:47 UTC (rev 4667)
+++ branches/2.6/http/classes/class_wfs_1_1.php 2009-09-21 12:21:41 UTC (rev 4668)
@@ -51,11 +51,13 @@
//
$nodeArray = $simpleXml->xpath("//wfs:TransactionResults/wfs:Action/wfs:Message");
$messageArray = array();
- foreach ($nodeArray as $node) {
- $domNode = dom_import_simplexml($node);
-
- $result->success = false;
- $messageArray[] = $domNode->nodeValue;
+ if ($nodeArray !== false) {
+ foreach ($nodeArray as $node) {
+ $domNode = dom_import_simplexml($node);
+
+ $result->success = false;
+ $messageArray[] = $domNode->nodeValue;
+ }
}
if (count($messageArray) > 0) {
$result->message = implode(". ", $messageArray);
@@ -67,22 +69,26 @@
//
$nodeArray = $simpleXml->xpath("//wfs:TransactionSummary/*");
$messageArray = array();
- foreach ($nodeArray as $node) {
- $domNode = dom_import_simplexml($node);
- $tagName = $this->sepNameSpace($domNode->nodeName);
- $result->success = true;
- $messageArray[] = $tagName . ": " . $domNode->nodeValue;
- }
+ if ($nodeArray !== false) {
+ foreach ($nodeArray as $node) {
+ $domNode = dom_import_simplexml($node);
+ $tagName = $this->sepNameSpace($domNode->nodeName);
+ $result->success = true;
+ $messageArray[] = $tagName . ": " . $domNode->nodeValue;
+ }
+ }
if (count($messageArray) > 0) {
$result->message = implode(". ", $messageArray);
// get fid
$nodeArray = $simpleXml->xpath("//wfs:InsertResults/wfs:Feature/ogc:FeatureId");
$e = new mb_exception(print_r($nodeArray, true));
- foreach ($nodeArray as $node) {
- $domNode = dom_import_simplexml($node);
- if ($domNode->hasAttribute("fid")) {
- $result->fid = $domNode->getAttribute("fid");
+ if ($nodeArray !== false) {
+ foreach ($nodeArray as $node) {
+ $domNode = dom_import_simplexml($node);
+ if ($domNode->hasAttribute("fid")) {
+ $result->fid = $domNode->getAttribute("fid");
+ }
}
}
return $result;
More information about the Mapbender_commits
mailing list