From 7b820bc830536123204037deb207b39c61b2f44b Mon Sep 17 00:00:00 2001 From: lobtao Date: Sat, 22 Jan 2022 14:48:41 +0800 Subject: [PATCH] fix $authVerifyFunc --- example/test.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/test.php b/example/test.php index 1d6ff7d..b19b8d2 100644 --- a/example/test.php +++ b/example/test.php @@ -25,18 +25,18 @@ // 该部分可以放在控制器方法内, 以提供通用调用服务 try { - $data = $rpc->handle('lobtao\\example\\service\\', $func, $args, function ($f, $p) { + $data = $rpc->handle('lobtao\\example\\service\\', $func, $args, function () use ($func) { // 白名单函数 $while_funcs = [ 'test_func1', 'test_func2', ]; - if (in_array($f, $while_funcs)) { + if (in_array($func, $while_funcs)) { return true; } - if ($f == 'test_func') { + if ($func == 'test_func') { throw new RpcException('禁止访问函数'); }