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

Wrong json_encode #53

Open
TrickyC94 opened this issue Mar 20, 2019 · 0 comments
Open

Wrong json_encode #53

TrickyC94 opened this issue Mar 20, 2019 · 0 comments

Comments

@TrickyC94
Copy link

TrickyC94 commented Mar 20, 2019

You have declared the AuditLog's field "diff" as "json_array" type, for which doctrine handles the conversion automatically.
In AuditSubscriber you convert to json the diff data (here and here) and the result in the database is that we have data encoded twice (in my case the second conversion applies a \ before every ") and when we try to retrieve the data using getDiff() we've the data as a json and not as array.
We are doing something wrong?

We're using Symfony 3.4 with doctrine/dbal 2.5

Update
We've seen pull request #51, and we think that it might've been implemented by mistake (probably it was an encoding issue on Mopster's side, since doctrine's json and json_array type require UTF-8 encoding on the DB's column).

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

1 participant