mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-53495 database xmldb: Use real length restriction.
This commit is contained in:
parent
4ee8ef5d41
commit
0b768e744f
6 changed files with 12 additions and 9 deletions
|
@ -714,7 +714,7 @@ class xmldb_table extends xmldb_object {
|
|||
// table parameter is ignored
|
||||
$name = $this->getName();
|
||||
if (strlen($name) > self::NAME_MAX_LENGTH) {
|
||||
return 'Invalid table name {'.$name.'}: name is too long. Limit is 28 chars.';
|
||||
return 'Invalid table name {'.$name.'}: name is too long. Limit is '.self::NAME_MAX_LENGTH.' chars.';
|
||||
}
|
||||
if (!preg_match('/^[a-z][a-z0-9_]*$/', $name)) {
|
||||
return 'Invalid table name {'.$name.'}: name includes invalid characters.';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue