1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-22 00:32:29 +02:00

[ticket/12643] Ensure that similarly named columns are not removed

PHPBB3-12643
This commit is contained in:
BorisBerdichevski 2014-06-15 14:15:42 -05:00 committed by Patrick Webster
parent ad11925c77
commit 2dc389c936

View File

@ -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