# Call to a member function getUri() on null - Twig + Slim 3

**URL:** <https://discourse.slimframework.com/t/call-to-a-member-function-geturi-on-null-twig-slim-3/2359>\
**Category:** Questions\
**Created:** [April 20, 2018, 7:40am UTC](https://discourse.slimframework.com/t/call-to-a-member-function-geturi-on-null-twig-slim-3/2359 "2018-04-20T07:40:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guna](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@Guna](https://discourse.slimframework.com/u/Guna)\
**Post date:** [April 20, 2018, 7:40am UTC](https://discourse.slimframework.com/t/call-to-a-member-function-geturi-on-null-twig-slim-3/2359/1 "2018-04-20T07:40:10Z")

</div>

I’m new to slim framework. In app.php file if i comment the **addExtension** line home.twig page is showing otherwise it’s giving me the following error. please help me to rectify this error.

Please find the below code in the link

[slim-authentication](https://github.com/gunaerode/slim-authentication)

 ![slim-authentication-project-error](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/47d9c5103ff8033e43f9b81c658ea6bd0e98904e.PNG)

Thank you

---

<div class="post-metadata">

**Author:** ![Guna](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@Guna](https://discourse.slimframework.com/u/Guna)\
**Post date:** [April 20, 2018, 8:54am UTC](https://discourse.slimframework.com/t/call-to-a-member-function-geturi-on-null-twig-slim-3/2359/2 "2018-04-20T08:54:40Z")

</div>

Sorry guys i found my mistake.

I’m forgot to pass the **$container** parameter in the $container [‘view’] function.
