mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-28080 coding_exception for over-long placeholder names.
This commit is contained in:
parent
9805fb9f17
commit
8de7858fb9
@ -747,6 +747,11 @@ abstract class moodle_database {
|
||||
if (!array_key_exists($key, $params)) {
|
||||
throw new dml_exception('missingkeyinsql', $key, '');
|
||||
}
|
||||
if (strlen($key) > 30) {
|
||||
throw new coding_exception(
|
||||
"Placeholder names must be 30 characters or shorter. '" .
|
||||
$key . "' is too long.", $sql);
|
||||
}
|
||||
$finalparams[$key] = $params[$key];
|
||||
}
|
||||
if ($count != count($finalparams)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user