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

CLI\Agent bug - server events are protected #1215

Open
Saacy opened this issue Jan 25, 2021 · 0 comments
Open

CLI\Agent bug - server events are protected #1215

Saacy opened this issue Jan 25, 2021 · 0 comments

Comments

@Saacy
Copy link

Saacy commented Jan 25, 2021

Hello. There is a problem with CLI\Agent class - it is trying to get events from CLI\WS object but those are protected.

/lib/cli/ws.php

Lines: 402-403

isset($this->server->events['send']) &&
is_callable($func=$this->server->events['send']))

Lines: 462-463

if (isset($this->server->events['disconnect']) &&
is_callable($func=$this->server->events['disconnect']))

Lines: 482-483

if (isset($server->events['connect']) &&
is_callable($func=$server->events['connect']))

You can fix it with $this->server->events()['send'], $this->server->events()['disconnect'] and $server->events()['connect'].

@Saacy Saacy changed the title CLIWS CLI\Agent bug - server events are protected Jan 25, 2021
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