Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get 500 while deleting cards. #3

Open
flexy1994 opened this issue Aug 11, 2015 · 3 comments
Open

Get 500 while deleting cards. #3

flexy1994 opened this issue Aug 11, 2015 · 3 comments

Comments

@flexy1994
Copy link

I override the CardDavBackend and return in deleteCard function true because i don't want that you can delete the Cards via mobile phone.

When the Phone requests the deletion i got an Error 500.

The prod log writes the following lines:

[2015-08-11 15:20:25] request.INFO: Matched route "secotrust_sabre_dav" (parameters: "_controller": "secotrust.sabredav.controller:execAction", "url": "addressbooks/user/Default/23b5bb10-2ef8-11e5-a79f-000c292a5dfb.vcf", "_route": "secotrust_sabre_dav") [] []
[2015-08-11 15:20:25] security.INFO: Populated SecurityContext with an anonymous Token [] []
[2015-08-11 15:20:25] request.CRITICAL: Uncaught PHP Exception LogicException: "getContent() can only be called once when using the resource return type." at /opt/lampp/htdocs/xyz/app/bootstrap.php.cache line 984 {"exception":"[object] (LogicException(code: 0): getContent() can only be called once when using the resource return type. at /opt/lampp/htdocs/xyz/app/bootstrap.php.cache:984)"} []
[2015-08-11 15:20:25] security.DEBUG: Write SecurityContext in the session [] []

In Secotrust\Bundle\SabreDavBundle\SabreDav\HttpRequest i changed

$this->setBody($request->getContent(true), true);

to:

$this->setBody($request->getContent(), true);

that works for me.

@flexy1994 flexy1994 changed the title Got 500 while deleting cards. Get 500 while deleting cards. Aug 11, 2015
@blaues0cke
Copy link

So, the basic question is: Does this change fix a bug or removes it a feature we dont know yet?

@snc
Copy link
Member

snc commented Aug 11, 2015

My question would be, why is there a second call to $request->getContent(true), there should only be one instance of the Secotrust\Bundle\SabreDavBundle\SabreDav\HttpRequest class?

@flexy1994
Copy link
Author

There isn't a second instance of the Secotrust\Bundle\SabreDavBundle\SabreDav\HttpRequest.
his happend only when I delete, update or create a card.
It crashes befor it goes to my custom CardDav Backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants