Selaa lähdekoodia

changed variable type according to the documentation

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19238 44c647ce-9c0f-0410-b52a-842ac1e357ba
bate 16 vuotta sitten
vanhempi
commit
32c7992476
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      library/Zend/Http/Client/Adapter/Curl.php

+ 2 - 2
library/Zend/Http/Client/Adapter/Curl.php

@@ -258,7 +258,7 @@ class Zend_Http_Client_Adapter_Curl implements Zend_Http_Client_Adapter_Interfac
      * @return string        $request
      * @throws Zend_Http_Client_Adapter_Exception If connection fails, connected to wrong host, no PUT file defined, unsupported method, or unsupported cURL option
      */
-    public function write($method, $uri, $httpVersion = '1.1', $headers = array(), $body = '')
+    public function write($method, $uri, $httpVersion = 1.1, $headers = array(), $body = '')
     {
         // Make sure we're properly connected
         if (!$this->_curl) {
@@ -346,7 +346,7 @@ class Zend_Http_Client_Adapter_Curl implements Zend_Http_Client_Adapter_Interfac
         }
 
         // get http version to use
-        $curlHttp = ($httpVersion == '1.1') ? CURL_HTTP_VERSION_1_1 : CURL_HTTP_VERSION_1_0;
+        $curlHttp = ($httpVersion == 1.1) ? CURL_HTTP_VERSION_1_1 : CURL_HTTP_VERSION_1_0;
 
         // mark as HTTP request and set HTTP method
         curl_setopt($this->_curl, $curlHttp, true);