Skip to content

CLI\Agent bug - server events are protected #1215

Open

Description

@Saacy

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'].

Activity

  1. changed the title [-]CLIWS[/-] [+]CLI\Agent bug - server events are protected[/+] on Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions