mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/12643] Ensure that similarly named columns are not removed
PHPBB3-12643
This commit is contained in:
parent
ad11925c77
commit
2dc389c936
1 changed files with 1 additions and 1 deletions
|
@ -1996,7 +1996,7 @@ class tools
|
||||||
|
|
||||||
$columns = implode(',', $column_list);
|
$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) === ',')
|
if (substr($new_table_cols, -1) === ',')
|
||||||
{
|
{
|
||||||
// Remove the comma from the last entry again
|
// Remove the comma from the last entry again
|
||||||
|
|
Loading…
Add table
Reference in a new issue