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