From 2dc389c936eb22fbb3e74b86c51501059fd5c1a6 Mon Sep 17 00:00:00 2001 From: BorisBerdichevski <borisba32@gmail.com> Date: Sun, 15 Jun 2014 14:15:42 -0500 Subject: [PATCH] [ticket/12643] Ensure that similarly named columns are not removed PHPBB3-12643 --- phpBB/phpbb/db/tools.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php index 3d065ede8e..3b329b47bc 100644 --- a/phpBB/phpbb/db/tools.php +++ b/phpBB/phpbb/db/tools.php @@ -1996,7 +1996,7 @@ class tools $columns = implode(',', $column_list); - $new_table_cols = trim(preg_replace('/' . $column_name . '[^,]+(?:,|$)/m', '', $new_table_cols)); + $new_table_cols = trim(preg_replace('/' . $column_name . '\b[^,]+(?:,|$)/m', '', $new_table_cols)); if (substr($new_table_cols, -1) === ',') { // Remove the comma from the last entry again