Skip to content

Commit 4ed323e

Browse files
author
李仕鹏
committed
fix回调时的bug
1 parent 922f0ea commit 4ed323e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CurlHttp.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function getAction()
5757
return $this->_action;
5858
}
5959

60-
public function setAction($action)
60+
private function setAction($action)
6161
{
6262
$this->_action = $action;
6363
}
@@ -131,12 +131,13 @@ public function getCurl()
131131

132132
public function httpExec($action = "/", $params = array())
133133
{
134-
$ch = $this->getCurl();
135134
$this->setAction($action);
136135
if($this->beforeRequest instanceof Closure) {
137136
$params = call_user_func($this->beforeRequest, $params, $this);
138137
empty($params) && $params = [];
139138
}
139+
$ch = $this->getCurl();
140+
$this->setAction($action);
140141
$url = $this->getUrl();
141142
if ($this->method == self::METHOD_POST) {
142143
curl_setopt($ch, CURLOPT_POST, 1);

0 commit comments

Comments
 (0)