{"action":"created","issue":{"url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1604","labels_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1604/labels{/name}","comments_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1604/comments","events_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1604/events","html_url":"https://github.com/ryancramerdesign/ProcessWire/issues/1604","id":125837389,"number":1604,"title":"3.0.3 devns FileCompiler issue with new TemplateFile()","user":{"login":"CanRau","id":5196971,"avatar_url":"https://avatars.githubusercontent.com/u/5196971?v=3","gravatar_id":"","url":"https://api.github.com/users/CanRau","html_url":"https://github.com/CanRau","followers_url":"https://api.github.com/users/CanRau/followers","following_url":"https://api.github.com/users/CanRau/following{/other_user}","gists_url":"https://api.github.com/users/CanRau/gists{/gist_id}","starred_url":"https://api.github.com/users/CanRau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanRau/subscriptions","organizations_url":"https://api.github.com/users/CanRau/orgs","repos_url":"https://api.github.com/users/CanRau/repos","events_url":"https://api.github.com/users/CanRau/events{/privacy}","received_events_url":"https://api.github.com/users/CanRau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-10T18:37:40Z","updated_at":"2016-01-17T10:23:57Z","closed_at":null,"body":"```PHP\r\nParse Error: syntax error, unexpected ',' (line 120 of /site/templates/chat.php)\r\n```\r\n\r\nThis I get when trying to instantiate a new TemplateFile from within a template like so\r\n```PHP\r\n$view = $this->wire(new TemplateFile());\r\n```\r\n\r\nAnd this\r\n```PHP\r\nNotice: Uninitialized string offset: 0 in /wire/core/FileCompiler.php on line 343\r\nParse Error: syntax error, unexpected '/' (line 119 of /site/templates/chat.php)\r\n```\r\nwhen instantiating without `$this->wire``\r\n\r\nall files got a `namespace ProcessWire` at the top.\r\n\r\n__EDIT__\r\nI disabled template file compiling in config.php `$config->templateCompile = false;`\r\nNow it works for me."},"comment":{"url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/comments/172310078","html_url":"https://github.com/ryancramerdesign/ProcessWire/issues/1604#issuecomment-172310078","issue_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1604","id":172310078,"user":{"login":"ryancramerdesign","id":328272,"avatar_url":"https://avatars.githubusercontent.com/u/328272?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancramerdesign","html_url":"https://github.com/ryancramerdesign","followers_url":"https://api.github.com/users/ryancramerdesign/followers","following_url":"https://api.github.com/users/ryancramerdesign/following{/other_user}","gists_url":"https://api.github.com/users/ryancramerdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancramerdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancramerdesign/subscriptions","organizations_url":"https://api.github.com/users/ryancramerdesign/orgs","repos_url":"https://api.github.com/users/ryancramerdesign/repos","events_url":"https://api.github.com/users/ryancramerdesign/events{/privacy}","received_events_url":"https://api.github.com/users/ryancramerdesign/received_events","type":"User","site_admin":false},"created_at":"2016-01-17T10:23:56Z","updated_at":"2016-01-17T10:23:56Z","body":"It looks like the issue is that FileCompiler expects you are providing a filename to TemplateFile(), i.e. `new TemplateFile($filename)`. Looking at TemplateFile, it looks like providing a filename to the constructor is optional, so FileCompiler shouldn't make that assumption. I have updated it here and it'll be  committed shortly. Thanks."}}