[mapguide-commits] r8417 - trunk/MgDev/UnitTest/WebTier/Php

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Oct 18 04:21:50 PDT 2014


Author: jng
Date: 2014-10-18 04:21:49 -0700 (Sat, 18 Oct 2014)
New Revision: 8417

Modified:
   trunk/MgDev/UnitTest/WebTier/Php/ResourceServiceAPI.php
Log:
#2494: The ApplyResourcePackage API also has issues in the PHP runner with invalid package files leading me to believe this is an issue at the C++ level. In the meantime, we apply the same workaround as the Java test runner

Modified: trunk/MgDev/UnitTest/WebTier/Php/ResourceServiceAPI.php
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Php/ResourceServiceAPI.php	2014-10-18 11:10:40 UTC (rev 8416)
+++ trunk/MgDev/UnitTest/WebTier/Php/ResourceServiceAPI.php	2014-10-18 11:21:49 UTC (rev 8417)
@@ -761,12 +761,16 @@
             $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"PACKAGE\"");
             $arrayParam["PACKAGE"]=Utils::GetPath($this->unitTestParamVm->GetString("ParamValue"));
 
-            $packageSource = new MgByteSource($arrayParam["PACKAGE"]);
-            $package = $packageSource->GetReader();
+            if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+                $packageSource = new MgByteSource($arrayParam["PACKAGE"]);
+                $package = $packageSource->GetReader();
 
-            $byteReader = $this->resourceSrvc->ApplyResourcePackage($package);
+                $byteReader = $this->resourceSrvc->ApplyResourcePackage($package);
 
-            return Utils::GetResponse($byteReader);
+                return Utils::GetResponse($byteReader);
+            } else {
+                return new Result("FIXME: ApplyResourcePackage will kill the mgserver on invalid package files", "text/plain");
+            }
         }
         catch (MgException $e)
         {



More information about the mapguide-commits mailing list