bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI\Agent bug - server events are protected

Saacy opened this issue · comments

commented

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