{"action":"opened","issue":{"url":"https://api.github.com/repos/jakubkulhan/bunny/issues/62","repository_url":"https://api.github.com/repos/jakubkulhan/bunny","labels_url":"https://api.github.com/repos/jakubkulhan/bunny/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/jakubkulhan/bunny/issues/62/comments","events_url":"https://api.github.com/repos/jakubkulhan/bunny/issues/62/events","html_url":"https://github.com/jakubkulhan/bunny/issues/62","id":305511283,"number":62,"title":"Bug in onFrameReceived() function in Channel.php, $client property unset","user":{"login":"Donatello-za","id":2649302,"avatar_url":"https://avatars3.githubusercontent.com/u/2649302?v=4","gravatar_id":"","url":"https://api.github.com/users/Donatello-za","html_url":"https://github.com/Donatello-za","followers_url":"https://api.github.com/users/Donatello-za/followers","following_url":"https://api.github.com/users/Donatello-za/following{/other_user}","gists_url":"https://api.github.com/users/Donatello-za/gists{/gist_id}","starred_url":"https://api.github.com/users/Donatello-za/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Donatello-za/subscriptions","organizations_url":"https://api.github.com/users/Donatello-za/orgs","repos_url":"https://api.github.com/users/Donatello-za/repos","events_url":"https://api.github.com/users/Donatello-za/events{/privacy}","received_events_url":"https://api.github.com/users/Donatello-za/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-15T11:22:27Z","updated_at":"2018-03-15T11:22:27Z","closed_at":null,"author_association":"NONE","body":"When disconnecting a client, e.g. `$client->disconnect()` or `$channel->close()` the `client` property is unset in the `onFrameReceived()` function in `Channel.php`, [see here](https://github.com/jakubkulhan/bunny/blob/d0dec8fbbac4e4edd6cdc892fe14cfa607c386ce/src/Bunny/Channel.php#L590).\r\n\r\nThis causes the exception below when subsequent calls are made to $channel->getClient() after a client have been disconnected:\r\n```\r\nPHP Notice:  Undefined property: Bunny\\Channel::$client in /home/vagrant/projects/gateways/vendor/bunny/bunny/src/Bunny/Channel.php on line 118\r\n```\r\n\r\nI think that instead of unsetting the property, e.g.,\r\n```php\r\nunset($this->client);\r\n```\r\n\r\nit should simply be set to `null`\r\n\r\n```php\r\n$this->client = null;\r\n```\r\n"}}
{"actor":{"display_login":"Donatello-za"}}