Browse Source

fix WFS GetFeature parse bad ogc query

Piotr Labudda 8 years ago
parent
commit
25cbc65778
1 changed files with 3 additions and 1 deletions
  1. 3 1
      SE/se-lib/Api/Wfs/GetFeature.php

+ 3 - 1
SE/se-lib/Api/Wfs/GetFeature.php

@@ -141,7 +141,9 @@ class Api_Wfs_GetFeature {
 
 		if (empty($requestOgcFilter)) return '';
 		$requestXml = new DOMDocument();
-		$requestXml->loadXml($requestOgcFilter);
+		if (!$requestXml->loadXml($requestOgcFilter)) {
+			throw new Exception("Parse ogc query failed");
+		}
 		$rootNode = $requestXml->documentElement;
 		// if ($rootNode->getAttribute('resolve'))
 		DBG::log([$rootNode->getAttribute('resolve'), $rootNode->getAttribute('resolveDepth')], 'array', "TODO: use wfs:GetFeature @resolve, @resolveDepth");