summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r--inc/HTTPClient.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index eea01f9d5..e68679bde 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -161,7 +161,7 @@ class HTTPClient {
* will be correctly encoded and added to the given base URL.
*
* @param string $url The URL to fetch
- * @param string $data Associative array of parameters
+ * @param array $data Associative array of parameters
* @param bool $sloppy304 Return body on 304 not modified
* @author Andreas Gohr <andi@splitbrain.org>
*/
@@ -276,7 +276,7 @@ class HTTPClient {
// open socket
$socket = @fsockopen($server,$port,$errno, $errstr, $this->timeout);
if (!$socket){
- $resp->status = '-100';
+ $this->status = -100;
$this->error = "Could not connect to $server:$port\n$errstr ($errno)";
return false;
}
@@ -560,6 +560,7 @@ class HTTPClient {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function _postEncode($data){
+ $url = '';
foreach($data as $key => $val){
if($url) $url .= '&';
$url .= urlencode($key).'='.urlencode($val);