{"action":"opened","issue":{"url":"https://api.github.com/repos/vimeo/psalm/issues/1128","repository_url":"https://api.github.com/repos/vimeo/psalm","labels_url":"https://api.github.com/repos/vimeo/psalm/issues/1128/labels{/name}","comments_url":"https://api.github.com/repos/vimeo/psalm/issues/1128/comments","events_url":"https://api.github.com/repos/vimeo/psalm/issues/1128/events","html_url":"https://github.com/vimeo/psalm/issues/1128","id":390943350,"node_id":"MDU6SXNzdWUzOTA5NDMzNTA=","number":1128,"title":"False positive UnusedVariable in try/catch/finally, potentially false negative too","user":{"login":"tomtomau","id":2062363,"node_id":"MDQ6VXNlcjIwNjIzNjM=","avatar_url":"https://avatars1.githubusercontent.com/u/2062363?v=4","gravatar_id":"","url":"https://api.github.com/users/tomtomau","html_url":"https://github.com/tomtomau","followers_url":"https://api.github.com/users/tomtomau/followers","following_url":"https://api.github.com/users/tomtomau/following{/other_user}","gists_url":"https://api.github.com/users/tomtomau/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtomau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtomau/subscriptions","organizations_url":"https://api.github.com/users/tomtomau/orgs","repos_url":"https://api.github.com/users/tomtomau/repos","events_url":"https://api.github.com/users/tomtomau/events{/privacy}","received_events_url":"https://api.github.com/users/tomtomau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-14T02:44:11Z","updated_at":"2018-12-14T02:44:11Z","closed_at":null,"author_association":"NONE","body":"Version: dev-master#\r\n\r\nThis is code we have written: https://getpsalm.org/r/855b47e04c\r\n\r\nIn this case, $stream is referenced in the finally block - false positive?\r\n\r\nIf we remove `$stream = null`, then Psalm does not report an issue with that use of $stream in the finally block, however $stream is an undefined variable - false negative then?\r\n\r\nPsalm: [https://getpsalm.org/r/80dd67be7d](https://getpsalm.org/r/80dd67be7d)\r\n3v4l: [https://3v4l.org/lFEK1](https://3v4l.org/lFEK1)\r\n\r\nI would have thought that this would have been reported as an issue by Psalm, it's as if anything that is declared in the try block is risky to be using outside that scope unless it has been defined earlier? Not sure exactly."}}
{"actor":{"display_login":"tomtomau"}}