Skip to content

Commit

Permalink
No longer gets string from report_customsql plugin
Browse files Browse the repository at this point in the history
This fixes an issue where block_configurable_report would report an "Invalid get_string() identifier: 'nosemicolon'" when saving an SQL query. This is only visible when debug is set to Developer mode and only happens if the report_customsql plugin is not also installed.
  • Loading branch information
michael-milette authored Dec 3, 2022
1 parent f63cf94 commit b6157b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/customsql/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function validation_high_security($data, $files) {

} else if (strpos($sql, ';') !== false) {
// Do not allow any semicolons.
$errors['querysql'] = get_string('nosemicolon', 'report_customsql');
$errors['querysql'] = get_string('nosemicolon', 'block_configurable_reports');

} else if ($CFG->prefix != '' && preg_match('/\b' . $CFG->prefix . '\w+/i', $sql)) {
// Make sure prefix is prefix_, not explicit.
Expand Down

0 comments on commit b6157b7

Please sign in to comment.