Fixed self::LIST_COMMA used with user-groups without "list" attribute

Xon

Well-known member
Affected version
2.3.3
Both AbstractField and AbstractPrefix implement user-group lists for allowed/editable lists, which are a type hinted on the entity as a list integers. The backing store uses Entity::LIST_COMMA/self::LIST_COMMA which will return a list of strings.

Using 'list' => ['type' => 'int', 'unique' => true, 'sort' => SORT_NUMERIC] in the column definition means the integer nature will be preserved and saved into json caches as expected.

This is most relevant if trying to use strict equality (via in_array or ===)

Needs to be int not postint, the sort attribute might not be needed.
 
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.5).

Change log:
Properly represent field and prefix user group IDs as a list of unique sorted integers
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom