bug in handle method
guitarneck opened this issue · comments
guitarneck commented
Hi,
There's a bug when you add an object insteed of a class name string.
It is in 'handle', at line 138. $newObj erase $obj (line 142). Then, eveything failed on Fatal Error.
$newObj doesn't seems necesary anymore at this point. Something like this correct it :
//if (is_string($obj) && !($newObj = $this->instantiateClass($obj))) {
if (is_string($obj) && !($obj = $this->instantiateClass($obj))) {
throw new Exception("Class $obj does not exist");
}
//$obj = $newObj; don't need this line anymore
$obj->server = $this;
Great job, by the way ! ;)