Skip to content

Commit 25cf009

Browse files
committed
Merge pull request #7 from MR4online/patch-1
Bugfix + user $http_function with namespace
2 parents bd5aece + 3c40187 commit 25cf009

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Subscriber.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function find_feed($url, $http_function = false) {
8888
* @return mixed
8989
*/
9090
public function subscribe($topic_url, $http_function = false) {
91-
return $this->change_subscription("subscribe", $topic_url, $http_function = false);
91+
return $this->change_subscription("subscribe", $topic_url, $http_function);
9292
}
9393

9494
/**
@@ -97,7 +97,7 @@ public function subscribe($topic_url, $http_function = false) {
9797
* @return mixed
9898
*/
9999
public function unsubscribe($topic_url, $http_function = false) {
100-
return $this->change_subscription("unsubscribe", $topic_url, $http_function = false);
100+
return $this->change_subscription("unsubscribe", $topic_url, $http_function);
101101
}
102102

103103
/**
@@ -129,7 +129,7 @@ private function change_subscription($mode, $topic_url, $http_function = false)
129129
// make the http post request and return true/false
130130
// easy to over-write to use your own http function
131131
if ($http_function)
132-
return $http_function($this->hub_url,$post_string);
132+
return call_user_func_array($http_function,array($this->hub_url,$post_string));
133133
else
134134
return $this->http($this->hub_url,$post_string);
135135
}

0 commit comments

Comments
 (0)