aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2011-07-14 20:13:15 +0200
committerJoas Schilling <nickvergessen@gmx.de>2011-07-14 20:13:15 +0200
commit7f7a0d8b9f04c233c19224d6bf4d7950798ab81c (patch)
tree4f329ecdaf8571bd6bd9afbf4ede7b6c641792c9 /phpBB/includes/db
parent4b2ff05a3b4467390a206bb56d0dcfcc39256e86 (diff)
parentb1608ae860d8b72d56916c08fdf78ca2135a08db (diff)
downloadforums-7f7a0d8b9f04c233c19224d6bf4d7950798ab81c.tar
forums-7f7a0d8b9f04c233c19224d6bf4d7950798ab81c.tar.gz
forums-7f7a0d8b9f04c233c19224d6bf4d7950798ab81c.tar.bz2
forums-7f7a0d8b9f04c233c19224d6bf4d7950798ab81c.tar.xz
forums-7f7a0d8b9f04c233c19224d6bf4d7950798ab81c.zip
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.
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r--phpBB/includes/db/db_tools.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php
index 50e308dea2..d23323a5b1 100644
--- a/phpBB/includes/db/db_tools.php
+++ b/phpBB/includes/db/db_tools.php
@@ -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);
}