Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strlen() expects parameter 1 to be string, array given #30

Closed
wslsq opened this issue Aug 29, 2023 · 1 comment
Closed

strlen() expects parameter 1 to be string, array given #30

wslsq opened this issue Aug 29, 2023 · 1 comment

Comments

@wslsq
Copy link

wslsq commented Aug 29, 2023

php版本:8.1.17
clinet版本:v3.0.14

代码
$roomIds = [ 2, 3, 4 ];
Gateway::joinGroup(xxxxxxxxxx, $roomIds);

报错
local.ERROR: strlen(): Argument #1 ($string) must be of type string, array given {"exception":"[object] (TypeError(code: 0): strlen(): Argument #1 ($string) must be of type string, array given at D:\laragon\www\da-back\vendor\workerman\gatewayclient\Gateway.php:1579)
[stacktrace]

1579行代码
$ext_len = strlen($data['ext_data']);

断点$data输出
array (
'cmd' => 20,
'local_ip' => 0,
'local_port' => 0,
'client_ip' => 0,
'client_port' => 0,
'connection_id' => 487,
'flag' => 1,
'gateway_port' => 0,
'ext_data' =>
array (
0 => 2,
1 => 3,
2 => 4,
),
'body' => '',
)

@wslsq wslsq closed this as completed Aug 29, 2023
@wslsq
Copy link
Author

wslsq commented Aug 29, 2023

对不起,看错了,以为可以批量入群

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant