mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10267] Call strlen() on $table_prefix for $max_length calculation.
PHPBB3-10267
This commit is contained in:
parent
e4707a8be7
commit
b1608ae860
1 changed files with 2 additions and 2 deletions
|
@ -2059,7 +2059,7 @@ class phpbb_db_tools
|
||||||
$table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
|
$table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
|
||||||
if (strlen($table_name . $index_name) - strlen($table_prefix) > 24)
|
if (strlen($table_name . $index_name) - strlen($table_prefix) > 24)
|
||||||
{
|
{
|
||||||
$max_length = $table_prefix + 24;
|
$max_length = strlen($table_prefix) + 24;
|
||||||
trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
|
trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2096,7 +2096,7 @@ class phpbb_db_tools
|
||||||
$table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
|
$table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
|
||||||
if (strlen($table_name . $index_name) - strlen($table_prefix) > 24)
|
if (strlen($table_name . $index_name) - strlen($table_prefix) > 24)
|
||||||
{
|
{
|
||||||
$max_length = $table_prefix + 24;
|
$max_length = strlen($table_prefix) + 24;
|
||||||
trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
|
trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue