summaryrefslogtreecommitdiff
path: root/plugins/Irc/extlib/phergie/Phergie/Plugin/Http.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Irc/extlib/phergie/Phergie/Plugin/Http.php')
-rw-r--r--plugins/Irc/extlib/phergie/Phergie/Plugin/Http.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/Irc/extlib/phergie/Phergie/Plugin/Http.php b/plugins/Irc/extlib/phergie/Phergie/Plugin/Http.php
index 43c69eb87..7c5c8704c 100644
--- a/plugins/Irc/extlib/phergie/Phergie/Plugin/Http.php
+++ b/plugins/Irc/extlib/phergie/Phergie/Plugin/Http.php
@@ -184,7 +184,10 @@ class Phergie_Plugin_Http extends Phergie_Plugin_Abstract
$type = $this->response->getHeaders('content-type');
foreach ($this->handlers as $expr => $handler) {
if (preg_match('#^' . $expr . '$#i', $type)) {
- $body = call_user_func($handler, $body);
+ $handled = call_user_func($handler, $body);
+ if (!empty($handled)) {
+ $body = $handled;
+ }
}
}
@@ -256,7 +259,7 @@ class Phergie_Plugin_Http extends Phergie_Plugin_Abstract
public function post($url, array $query = array(),
array $post = array(), array $context = array()
) {
- if (!empty($params)) {
+ if (!empty($query)) {
$url .= '?' . http_build_query($query);
}
@@ -278,4 +281,4 @@ class Phergie_Plugin_Http extends Phergie_Plugin_Abstract
return $this->request($url, $context);
}
-}
+} \ No newline at end of file