From 4d38dd27def63a7f5d5673e38b2cc1c06193238e Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Fri, 20 Oct 2006 18:36:25 +0200
Subject: [PATCH] fix for post support in HTTPClient

darcs-hash:20061020163625-7ad00-d83f31886b140150ca5baf25cf016ab3af7afcf9.gz
---
 inc/HTTPClient.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index e42db26c4..aaded04ae 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -179,7 +179,7 @@ class HTTPClient {
         $headers['Referer']    = $this->referer;
         $headers['Connection'] = 'Close';
         if($method == 'POST'){
-            $post = _postEncode($data);
+            $post = $this->_postEncode($data);
             $headers['Content-Type']   = 'application/x-www-form-urlencoded';
             $headers['Content-Length'] = strlen($post);
         }
@@ -424,7 +424,7 @@ class HTTPClient {
      * @author Andreas Gohr <andi@splitbrain.org>
      */
     function _postEncode($data){
-        foreach($params as $key => $val){
+        foreach($data as $key => $val){
             if($url) $url .= '&';
             $url .= $key.'='.urlencode($val);
         }
-- 
GitLab