{"action":"created","issue":{"url":"https://api.github.com/repos/php/php-src/issues/2031","repository_url":"https://api.github.com/repos/php/php-src","labels_url":"https://api.github.com/repos/php/php-src/issues/2031/labels{/name}","comments_url":"https://api.github.com/repos/php/php-src/issues/2031/comments","events_url":"https://api.github.com/repos/php/php-src/issues/2031/events","html_url":"https://github.com/php/php-src/pull/2031","id":167266653,"node_id":"MDExOlB1bGxSZXF1ZXN0Nzg2MTY2MTM=","number":2031,"title":"Fix #37676 : Add E_WARNING when using array-index on non valid container","user":{"login":"bp1222","id":516652,"node_id":"MDQ6VXNlcjUxNjY1Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/516652?v=4","gravatar_id":"","url":"https://api.github.com/users/bp1222","html_url":"https://github.com/bp1222","followers_url":"https://api.github.com/users/bp1222/followers","following_url":"https://api.github.com/users/bp1222/following{/other_user}","gists_url":"https://api.github.com/users/bp1222/gists{/gist_id}","starred_url":"https://api.github.com/users/bp1222/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp1222/subscriptions","organizations_url":"https://api.github.com/users/bp1222/orgs","repos_url":"https://api.github.com/users/bp1222/repos","events_url":"https://api.github.com/users/bp1222/events{/privacy}","received_events_url":"https://api.github.com/users/bp1222/received_events","type":"User","site_admin":false},"labels":[{"id":985259548,"node_id":"MDU6TGFiZWw5ODUyNTk1NDg=","url":"https://api.github.com/repos/php/php-src/labels/PHP%207.3%20Nominated","name":"PHP 7.3 Nominated","color":"d93f0b","default":false},{"id":148912247,"node_id":"MDU6TGFiZWwxNDg5MTIyNDc=","url":"https://api.github.com/repos/php/php-src/labels/RFC","name":"RFC","color":"c7def8","default":false},{"id":510745531,"node_id":"MDU6TGFiZWw1MTA3NDU1MzE=","url":"https://api.github.com/repos/php/php-src/labels/Waiting%20on%20Author","name":"Waiting on Author","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":50,"created_at":"2016-07-25T01:29:04Z","updated_at":"2018-07-19T14:23:20Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/php/php-src/pulls/2031","html_url":"https://github.com/php/php-src/pull/2031","diff_url":"https://github.com/php/php-src/pull/2031.diff","patch_url":"https://github.com/php/php-src/pull/2031.patch"},"body":"This bugfix attempts to resolve [37676](https://bugs.php.net/bug.php?id=37676).  It will make sure that the container is either compiled, or if it's a return-variable make sure it's something that we know is error-able.\n\nUpdated tests to account for the E_NOTICE that will go out with this fix.\n\nOther related bugs:\n[39915](https://bugs.php.net/bug.php?id=39915)\n[72636](https://bugs.php.net/bug.php?id=72636)\n"},"comment":{"url":"https://api.github.com/repos/php/php-src/issues/comments/406294063","html_url":"https://github.com/php/php-src/pull/2031#issuecomment-406294063","issue_url":"https://api.github.com/repos/php/php-src/issues/2031","id":406294063,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjI5NDA2Mw==","user":{"login":"Majkl578","id":144181,"node_id":"MDQ6VXNlcjE0NDE4MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/144181?v=4","gravatar_id":"","url":"https://api.github.com/users/Majkl578","html_url":"https://github.com/Majkl578","followers_url":"https://api.github.com/users/Majkl578/followers","following_url":"https://api.github.com/users/Majkl578/following{/other_user}","gists_url":"https://api.github.com/users/Majkl578/gists{/gist_id}","starred_url":"https://api.github.com/users/Majkl578/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Majkl578/subscriptions","organizations_url":"https://api.github.com/users/Majkl578/orgs","repos_url":"https://api.github.com/users/Majkl578/repos","events_url":"https://api.github.com/users/Majkl578/events{/privacy}","received_events_url":"https://api.github.com/users/Majkl578/received_events","type":"User","site_admin":false},"created_at":"2018-07-19T14:23:20Z","updated_at":"2018-07-19T14:23:20Z","author_association":"CONTRIBUTOR","body":"> However, I do accept that NULL is a more-special value. \r\n\r\nPlease don't turn PHP into Java. :)\r\nYou can't call methods on NULL, you can't pass NULL into non-nullable parameters.\r\n\r\n> it would seem that access on an uninitialized variable doesn't raise the warning. This wasn't directly accessed in the RFC either, however, I would assume that it should also raise the warning\r\n\r\nUndefined variable is also an invalid container (as it becomes NULL upon access), so yes, it needs to be reported. There is already E_NOTICE for accessing an undefined variable, but not for an undefined index access, so E_NOTICE for undefined variable + E_WARNING for non-container sounds correct (especially because E_NOTICE is weaker than E_WARNING)."}}
{"actor":{"display_login":"Majkl578"}}