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

Postgres Json type error on save #677

Closed
bytedevzone opened this issue Aug 14, 2017 · 3 comments
Closed

Postgres Json type error on save #677

bytedevzone opened this issue Aug 14, 2017 · 3 comments

Comments

@bytedevzone
Copy link

When try to save json type data using PostgreSQL add slashes on json encoded string in wrong format, below mentioned actual data to save and converted data while debugging Query.php

Actual data : '{"value":"Supplier 1","id":"4c49455250505355f00001e774e18ed2"}'

Converted to : '{"value":"Supplier 1","id":"4c49455250505355f00001e774e18ed2"}' and raise an error.

It works after commenting the line 423 in /system/Database/Query.php

$escapedValue = preg_quote(trim($escapedValue, $this->db->escapeChar), '|');

@lonnieezell
Copy link
Member

I plan on trying to replace the preg_replace for named binds with a strtr tonight. I think that will fix things... should fix this, also.

@samsonasik
Copy link
Member

@lonnieezell just ref , at #678, using stripslashes fix the postgres part, but it will make the mysql part error

@samsonasik
Copy link
Member

@abldev should be fixed at develop now

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