-
Notifications
You must be signed in to change notification settings - Fork 17
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
Having the question mark character "?" in cleaner pre/post sql fields causes ERROR: Incorrect number of query parameters #105
Comments
Probably this just needs some extra escaping to happen right before we run the sql, ie. here: https://github.com/catalyst/moodle-local_datacleaner/blob/master/cleaner/custom_sql_post/classes/clean.php#L43 |
@nayabbukhari We probably should also make a simple unit test for this, to feed in some test sql and see that it doesn't error |
Hi All Here is an update. The Place holder issue is a bug related to PHP and is fixed for 7.4. Issue Discussion: https://stackoverflow.com/questions/36173440/ ... when-using-pdo-with-postgresql I will test with 7.4 and update the ticket & plugin issue with results. Regards |
That doesn't sound right at all, moodle doesn't use the PDO drivers |
Instruction:
Settings
1- Execute custom database query at post-wash
admin/settings.php?section=cleaner_custom_sql_post
2- Execute custom database query at pre-wash
admin/settings.php?section=cleaner_custom_sql_pre
If there is any ?/Placeholder On below boxes, there will be an error as shown below
Default exception handler: ERROR: Incorrect number of query parameters. Expected 1, got 0. Debug:
// error for admin/settings.php?section=cleaner_custom_sql_post
line 43 of /local/datacleaner/cleaner/custom_sql_post/classes/clean.php: call to local_datacleaner\clean::execute_sql()
Solution:
We can create separate input boxes for the password and decode/encrypt that field to store ?/placeholder.
Questions are welcome.
The text was updated successfully, but these errors were encountered: