{"action":"created","issue":{"url":"https://api.github.com/repos/twigphp/Twig/issues/1912","labels_url":"https://api.github.com/repos/twigphp/Twig/issues/1912/labels{/name}","comments_url":"https://api.github.com/repos/twigphp/Twig/issues/1912/comments","events_url":"https://api.github.com/repos/twigphp/Twig/issues/1912/events","html_url":"https://github.com/twigphp/Twig/issues/1912","id":115276158,"number":1912,"title":"Undefined variable: name in vendor/twig/twig/lib/Twig/Environment.php line 740","user":{"login":"lxg","id":208363,"avatar_url":"https://avatars.githubusercontent.com/u/208363?v=3","gravatar_id":"","url":"https://api.github.com/users/lxg","html_url":"https://github.com/lxg","followers_url":"https://api.github.com/users/lxg/followers","following_url":"https://api.github.com/users/lxg/following{/other_user}","gists_url":"https://api.github.com/users/lxg/gists{/gist_id}","starred_url":"https://api.github.com/users/lxg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxg/subscriptions","organizations_url":"https://api.github.com/users/lxg/orgs","repos_url":"https://api.github.com/users/lxg/repos","events_url":"https://api.github.com/users/lxg/events{/privacy}","received_events_url":"https://api.github.com/users/lxg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-05T12:45:09Z","updated_at":"2015-11-05T12:52:41Z","closed_at":"2015-11-05T12:52:41Z","body":"The [following line](https://github.com/twigphp/Twig/blob/1.x/lib/Twig/Environment.php#L740) causes an “undefined variable” error:\r\n\r\n    @trigger_error(sprintf('Defining the initRuntime() method in an extension is deprecated. Use the `needs_environment` option to get the Twig_Environment instance in filters, functions, or tests; or explicitly implement Twig_Extension_InitRuntimeInterface if needed (not recommended).', $name), E_USER_DEPRECATED);\r\n\r\nObviously, because the `$name` variable isn’t set. As it looks, it is not even necessary to use `sprintf()` here, as there are no parameters to insert."},"comment":{"url":"https://api.github.com/repos/twigphp/Twig/issues/comments/154050468","html_url":"https://github.com/twigphp/Twig/issues/1912#issuecomment-154050468","issue_url":"https://api.github.com/repos/twigphp/Twig/issues/1912","id":154050468,"user":{"login":"fabpot","id":47313,"avatar_url":"https://avatars.githubusercontent.com/u/47313?v=3","gravatar_id":"","url":"https://api.github.com/users/fabpot","html_url":"https://github.com/fabpot","followers_url":"https://api.github.com/users/fabpot/followers","following_url":"https://api.github.com/users/fabpot/following{/other_user}","gists_url":"https://api.github.com/users/fabpot/gists{/gist_id}","starred_url":"https://api.github.com/users/fabpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabpot/subscriptions","organizations_url":"https://api.github.com/users/fabpot/orgs","repos_url":"https://api.github.com/users/fabpot/repos","events_url":"https://api.github.com/users/fabpot/events{/privacy}","received_events_url":"https://api.github.com/users/fabpot/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T12:52:41Z","updated_at":"2015-11-05T12:52:41Z","body":"fixed in 1.23.1"}}