Skip to content

Conversation

@blizzz
Copy link
Member

@blizzz blizzz commented Dec 20, 2023

Summary

With array_unique it is possible that the keys are not in sequential order but have gaps. json_encode then would store them as associative array, which later on json_decode would result in a stdClass by default. This is unexpected and would also contradict the return type hint.

Checklist

@blizzz blizzz added this to the Nextcloud 29 milestone Dec 20, 2023
@blizzz
Copy link
Member Author

blizzz commented Dec 20, 2023

/backport to stable28

@blizzz
Copy link
Member Author

blizzz commented Dec 20, 2023

/backport to stable27

@blizzz
Copy link
Member Author

blizzz commented Dec 20, 2023

/backport to stable26

With array_unique it is possible that the keys are not in sequential order
but have gaps. json_encode then would store them as associative array,
which later on json_decode would result in a stdClass by default. This is
unexpected and would also contradict the return type hint.

Signed-off-by: Arthur Schiwon <[email protected]>
@blizzz blizzz force-pushed the fix/42374/ldap-remembered-groups-format branch from cacbcbe to ee096f8 Compare December 20, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: OCA\User_LDAP\Group_LDAP::getCachedGroupsForUserId(): Return value must be of type array, stdClass returned

5 participants