1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 07:07:51 +02:00

Merge remote branch 'remotes/bantu/ticket/10267' into develop-olympus

* remotes/bantu/ticket/10267:
  [ticket/10267] Call strlen() on $table_prefix for $max_length calculation.
This commit is contained in:
Joas Schilling 2011-07-14 20:13:15 +02:00
commit 7f7a0d8b9f

View File

@ -2059,7 +2059,7 @@ class phpbb_db_tools
$table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
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);
}
@ -2096,7 +2096,7 @@ class phpbb_db_tools
$table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
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);
}