Call to a member function has() on a non-object symfony2

Call to a member function has() on a non-object symfony2

Author: KennyMcCormick Date: 30.05.2017

I have a read a lot of topics on this and I can't seem to find a solution to my problem.

Newest Questions - Stack Overflow

The error is FatalErrorException: I am sure the problem is that the doctrine container is not present which is why I am having issues. The container is injected into the controller if not explicitely defined as a service using setter injection calling the method setContainer with the container as argument.

Now as you configured your controller as a service you need to add the setContainer call to your service configuration.

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

call to a member function has() on a non-object symfony2

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.

Home — Doctrine Project

Log In Sign Up. Join the Stack Overflow Community.

call to a member function has() on a non-object symfony2

Stack Overflow is a community of 7. Join them; it only takes a minute: Call to a member function has on a non-object Ask Question.

Any help is appreciated. Sundar's response work in my case. I had the same problem, and now it works.

How you can use foreach or while function in Symfony2

The problem is the container not being injected into the controller here. Sundar 1 Sign up or log in StackExchange. Sign up using Facebook.

Sign up using Email and Password. Post as a guest Name.

Newest 'php' Questions - Stack Overflow

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.

inserted by FC2 system