Set data type should be an array in column_row.twig template (#17650)

The column_row.twig template that was introduced with version 5.2.0 seems to define set fields as single values rather than as array values. This causes any inserts to set fields to fail and result in a blank page.

The previous version had sets properly defined as arrays:
https://github.com/phpmyadmin/phpmyadmin/blob/RELEASE_5_1_4/libraries/classes/InsertEdit.php#L1307

Fixes: #17557

Signed-off-by: Eric Perrino <ericpp@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Eric P 2022-07-22 11:44:22 -05:00 committed by GitHub
parent 9f395c7ca3
commit 85bb635361
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@
{% elseif column.pma_type == 'set' %}
{{ backup_field|raw }}
<input type="hidden" name="fields_type[multi_edit][{{ row_id }}][{{ column.Field_md5 }}]" value="set">
<select name="fields[multi_edit][{{ row_id }}][{{ column.Field_md5 }}]" class="textfield" size="{{ set_select_size }}" id="field_{{ id_index }}_3" onchange="return verificationsAfterFieldChange('{{ column.Field_md5|escape_js_string }}', '{{ row_id|escape_js_string }}', '{{ column.pma_type }}')" multiple>
<select name="fields[multi_edit][{{ row_id }}][{{ column.Field_md5 }}][]" class="textfield" size="{{ set_select_size }}" id="field_{{ id_index }}_3" onchange="return verificationsAfterFieldChange('{{ column.Field_md5|escape_js_string }}', '{{ row_id|escape_js_string }}', '{{ column.pma_type }}')" multiple>
{% for set_value in set_values %}
<option value="{{ set_value.plain }}"{{ set_value.plain in data|split(',') ? ' selected' }}>{{ set_value.plain }}</option>
{% endfor %}