aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2011-07-14 20:13:44 +0200
committerJoas Schilling <nickvergessen@gmx.de>2011-07-14 20:13:44 +0200
commit381e31d73818de10ad8df227f20dd3d9350ad37f (patch)
tree82314afc10de8ba49f58f5c2d247083980d505d5
parentd16525e176dc01e7aabad1e59d84ae8a08122dd5 (diff)
parent7f7a0d8b9f04c233c19224d6bf4d7950798ab81c (diff)
downloadforums-381e31d73818de10ad8df227f20dd3d9350ad37f.tar
forums-381e31d73818de10ad8df227f20dd3d9350ad37f.tar.gz
forums-381e31d73818de10ad8df227f20dd3d9350ad37f.tar.bz2
forums-381e31d73818de10ad8df227f20dd3d9350ad37f.tar.xz
forums-381e31d73818de10ad8df227f20dd3d9350ad37f.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10267] Call strlen() on $table_prefix for $max_length calculation.
-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 98728f7e8f..7c96965a9b 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);
}