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

wp-includes\translations.php - Reserved words in select queries #276

Open
johnchodgson opened this Issue Apr 23, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@johnchodgson
Copy link

johnchodgson commented Apr 23, 2018

When using the Ninja-Forms plugin I noticed it was using the reserved keyword "key". While this was successfully handled when creating some of the tables it failed in the select query.

I fixed this in by changing the translations.php around line 801.

Replacing:
$query = str_replace('`', '', $query);
with
$query = preg_replace('/`(.*?)`/', '[$1]', $query);

This should replace any field wrapped in field with [field]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment