Call to a member function on a non object symfony

php - FatalErrorException: Error: Call to a member function has() on a non-object - Stack Overflow

Hi I want to render a form in symFony2 with dynamic fields added to it. So I have wrote code in controller as:. Your controller AnotherClass requires the Dependency Injection Container since you are extending the base Controller class, you have to set it after you instantiate it:.

By posting your answer, you agree to the privacy policy and terms of service. Stack Overflow Questions Developer Jobs Documentation beta Tags Users.

Sign up or log in to customize your list. Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us.

php - Symfony 2 - Error : "Call to a member function * on a non-object in * line * - Stack Overflow

Log In Sign Up. Join the Stack Overflow Community. Stack Overflow is a community of 7.

Join them; it only takes a minute: Call to a member function get on a non-object Symfony2 Ask Question. So I have wrote code in controller as: Call to a member function get on a non-object. Sunil Rawat 2 Your controller AnotherClass requires the Dependency Injection Container since you are extending the base Controller class, you have to set it after you instantiate it: I wrote exactly the same answer: Sign up or log in StackExchange. Sign up using Facebook. Sign up using Email and Password.

php - Symfony 2 - Error : "Call to a member function * on a non-object in * line * - Stack Overflow

Post as a guest Name. Stack Overflow works best with JavaScript enabled. MathOverflow Mathematics Cross Validated stats Theoretical Computer Science Physics Chemistry Biology Computer Science Philosophy more 3.

Meta Stack Exchange Stack Apps Area 51 Stack Overflow Talent.

Rating 4,1 stars - 812 reviews
inserted by FC2 system