[fusion-commits] r2211 - trunk/layers/MapGuide/php
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Aug 31 06:09:47 EDT 2010
Author: hubu
Date: 2010-08-31 10:09:46 +0000 (Tue, 31 Aug 2010)
New Revision: 2211
Modified:
trunk/layers/MapGuide/php/Utilities.php
Log:
Fix FeatureInfor widget issue.
There is a PHP warning(Warning: Invalid argument supplied for foreach() in Utilities.php on line 776).
This warning will block the featureinfocontroller.php.
The reason is the $mappings is not array. This solution converts the $mappings to an array.
Modified: trunk/layers/MapGuide/php/Utilities.php
===================================================================
--- trunk/layers/MapGuide/php/Utilities.php 2010-08-31 09:49:08 UTC (rev 2210)
+++ trunk/layers/MapGuide/php/Utilities.php 2010-08-31 10:09:46 UTC (rev 2211)
@@ -773,7 +773,7 @@
array_push($properties->$layerName->metadatanames, 'length');
$mappings = $_SESSION['property_mappings'][$layerObj->GetObjectId()];
- foreach($mappings as $name => $value)
+ foreach((array)$mappings as $name => $value)
{
$propType = $featureReader->GetPropertyType($name);
array_push($properties->$layerName->propertynames, $name);
More information about the fusion-commits
mailing list