diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 78abb9f5f..5f4bcc518 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -937,12 +937,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "1fe6534d9075bcd3c421e6ef7399ac32341ac7f4" + "reference": "f8a4e65cf6b57531c8536462b30892eae49c7809" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/1fe6534d9075bcd3c421e6ef7399ac32341ac7f4", - "reference": "1fe6534d9075bcd3c421e6ef7399ac32341ac7f4", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f8a4e65cf6b57531c8536462b30892eae49c7809", + "reference": "f8a4e65cf6b57531c8536462b30892eae49c7809", "shasum": "", "mirrors": [ { @@ -959,7 +959,7 @@ "ext-mbstring": "*", "topthink/framework": "^6.0" }, - "time": "2020-12-16T07:15:01+00:00", + "time": "2020-12-18T05:04:10+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index 6ee5385a8..120813c37 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library', diff --git a/vendor/zoujingli/think-library/src/extend/JsonRpcClient.php b/vendor/zoujingli/think-library/src/extend/JsonRpcClient.php index f25989e9a..7982062a1 100644 --- a/vendor/zoujingli/think-library/src/extend/JsonRpcClient.php +++ b/vendor/zoujingli/think-library/src/extend/JsonRpcClient.php @@ -17,6 +17,8 @@ declare (strict_types=1); namespace think\admin\extend; +use think\admin\Exception; + /** * JsonRpc 客户端 * Class JsonRpcClient @@ -51,7 +53,7 @@ class JsonRpcClient * @param string $method * @param array $params * @return mixed - * @throws \think\admin\Exception + * @throws Exception */ public function __call(string $method, array $params) { @@ -75,16 +77,16 @@ class JsonRpcClient fclose($fp); $response = json_decode($response, true); } else { - throw new \think\admin\Exception("无法连接到 {$this->proxy}"); + throw new Exception("无法连接到 {$this->proxy}"); } // Final checks and return if ($response['id'] != $this->id) { - throw new \think\admin\Exception("错误的响应标记 (请求标记: {$this->id}, 响应标记: {$response['id']})"); + throw new Exception("错误标记 (请求标记: {$this->id}, 响应标记: {$response['id']})"); } if (is_null($response['error'])) { return $response['result']; } else { - throw new \think\admin\Exception("请求错误:{$response['error']['message']}", $response['error']['code']); + throw new Exception("请求错误:{$response['error']['message']}", $response['error']['code']); } } } \ No newline at end of file diff --git a/vendor/zoujingli/think-library/src/extend/JsonRpcServer.php b/vendor/zoujingli/think-library/src/extend/JsonRpcServer.php index 0fb960524..00644f026 100644 --- a/vendor/zoujingli/think-library/src/extend/JsonRpcServer.php +++ b/vendor/zoujingli/think-library/src/extend/JsonRpcServer.php @@ -73,7 +73,8 @@ class JsonRpcServer $response = ['jsonrpc' => '2.0', 'id' => $request['id'], 'result' => null, 'error' => $error]; } else try { // Executes the task on local object - if ($result = @call_user_func_array([$object, $request['method']], $request['params'])) { + if (method_exists($object, $request['method'])) { + $result = call_user_func_array([$object, $request['method']], $request['params']); $response = ['jsonrpc' => '2.0', 'id' => $request['id'], 'result' => $result, 'error' => null]; } else { $error = ['code' => '-32601', 'message' => '找不到方法', 'meaning' => '该方法不存在或无效'];