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

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Oct 17 06:27:47 PDT 2014


Author: jng
Date: 2014-10-17 06:27:46 -0700 (Fri, 17 Oct 2014)
New Revision: 8414

Modified:
   trunk/MgDev/UnitTest/WebTier/Php/HttpRequest.php
Log:
#2494: Convert "@" POST parameters that denote file paths to CURLFile objects to fix deprecation warning.

Modified: trunk/MgDev/UnitTest/WebTier/Php/HttpRequest.php
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Php/HttpRequest.php	2014-10-17 12:40:50 UTC (rev 8413)
+++ trunk/MgDev/UnitTest/WebTier/Php/HttpRequest.php	2014-10-17 13:27:46 UTC (rev 8414)
@@ -41,6 +41,11 @@
         curl_setopt($this->ch, CURLOPT_HTTPGET, true);
         if ("POST" == $requestType)
         {
+            foreach ($arrayParam as $key => $value) {
+                if (strpos($value, "@") === 0) {
+                    $arrayParam[$key] = new CURLFile(substr($value, 1));
+                }
+            }
             curl_setopt($this->ch, CURLOPT_POST,1);
             curl_setopt($this->ch, CURLOPT_POSTFIELDS, $arrayParam);
         }



More information about the mapguide-commits mailing list