diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-07-14 02:09:22 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-07-14 02:09:22 +0200 |
commit | b1608ae860d8b72d56916c08fdf78ca2135a08db (patch) | |
tree | 9c384ab18365958dd308b21dc30ee5b812112bc6 /phpBB/includes/db | |
parent | e4707a8be75263e610b00b3d600144e797f576d9 (diff) | |
download | forums-b1608ae860d8b72d56916c08fdf78ca2135a08db.tar forums-b1608ae860d8b72d56916c08fdf78ca2135a08db.tar.gz forums-b1608ae860d8b72d56916c08fdf78ca2135a08db.tar.bz2 forums-b1608ae860d8b72d56916c08fdf78ca2135a08db.tar.xz forums-b1608ae860d8b72d56916c08fdf78ca2135a08db.zip |
[ticket/10267] Call strlen() on $table_prefix for $max_length calculation.
PHPBB3-10267
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r-- | phpBB/includes/db/db_tools.php | 4 |
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); } |