{"action":"created","issue":{"url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/301","labels_url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/301/comments","events_url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/301/events","html_url":"https://github.com/videlalvaro/php-amqplib/pull/301","id":97954841,"number":301,"title":"Fixed fatal error in some cases on Channel.wait with timeout","user":{"login":"todoshcenko","id":1117100,"avatar_url":"https://avatars.githubusercontent.com/u/1117100?v=3","gravatar_id":"","url":"https://api.github.com/users/todoshcenko","html_url":"https://github.com/todoshcenko","followers_url":"https://api.github.com/users/todoshcenko/followers","following_url":"https://api.github.com/users/todoshcenko/following{/other_user}","gists_url":"https://api.github.com/users/todoshcenko/gists{/gist_id}","starred_url":"https://api.github.com/users/todoshcenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/todoshcenko/subscriptions","organizations_url":"https://api.github.com/users/todoshcenko/orgs","repos_url":"https://api.github.com/users/todoshcenko/repos","events_url":"https://api.github.com/users/todoshcenko/events{/privacy}","received_events_url":"https://api.github.com/users/todoshcenko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-29T14:52:33Z","updated_at":"2015-07-29T15:01:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/videlalvaro/php-amqplib/pulls/301","html_url":"https://github.com/videlalvaro/php-amqplib/pull/301","diff_url":"https://github.com/videlalvaro/php-amqplib/pull/301.diff","patch_url":"https://github.com/videlalvaro/php-amqplib/pull/301.patch"},"body":"Changed demo/amqp_consumer.php\r\n```php\r\nwhile (true)\r\n{\r\n    try\r\n    {\r\n        if (count($ch->callbacks))\r\n        {\r\n            $ch->wait(null, false, 1);\r\n        }\r\n    }\r\n    catch (AMQPTimeoutException $e)\r\n    {\r\n    }\r\n    catch (AMQPProtocolConnectionException $e)\r\n    {\r\n    }\r\n}\r\n```\r\n\r\nIf RabbitMQ restarts while this code is running it leads to PHP fatal error \"Call to a member function getTimeout()\""},"comment":{"url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/comments/125981084","html_url":"https://github.com/videlalvaro/php-amqplib/pull/301#issuecomment-125981084","issue_url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/301","id":125981084,"user":{"login":"todoshcenko","id":1117100,"avatar_url":"https://avatars.githubusercontent.com/u/1117100?v=3","gravatar_id":"","url":"https://api.github.com/users/todoshcenko","html_url":"https://github.com/todoshcenko","followers_url":"https://api.github.com/users/todoshcenko/followers","following_url":"https://api.github.com/users/todoshcenko/following{/other_user}","gists_url":"https://api.github.com/users/todoshcenko/gists{/gist_id}","starred_url":"https://api.github.com/users/todoshcenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/todoshcenko/subscriptions","organizations_url":"https://api.github.com/users/todoshcenko/orgs","repos_url":"https://api.github.com/users/todoshcenko/repos","events_url":"https://api.github.com/users/todoshcenko/events{/privacy}","received_events_url":"https://api.github.com/users/todoshcenko/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T15:01:48Z","updated_at":"2015-07-29T15:01:48Z","body":"This code only demonstrates the problem. I think a library shouldn't allow fatal errors to occur"}}