2
Close array key gaps in returned arrays
Source: nextcloud/server#6972 · opened by @nickvergessen
In a lot of places we take the [first mount point]( [first node]( etc.
The issue is, that the returned results are handled by array_filter before.
The problem with that is, that [0] may be undefined. There is currently a bug open in the retention repo:
While this can be easily fixed on the consumer side:
I think we should array_values all the results, to make sure the array keys are lined. We have a lot of consumers of these APIs and all I found did [0] instead of array_shift or something similar. So @rullzer and I think fixing the indexes here is the better idea.
@icewind1991 any other idea?
The issue is, that the returned results are handled by array_filter before.
The problem with that is, that [0] may be undefined. There is currently a bug open in the retention repo:
While this can be easily fixed on the consumer side:
I think we should array_values all the results, to make sure the array keys are lined. We have a lot of consumers of these APIs and all I found did [0] instead of array_shift or something similar. So @rullzer and I think fixing the indexes here is the better idea.
@icewind1991 any other idea?
No pledges yet. Be the first to back this.
Comments
Similar requests
PHP Calendar API: Write support
3 votes · 0 comments
Federated share OCS responses include the share's refresh_token
0 votes · 0 comments
'searchUsers' executes slowly with ldapquery
0 votes · 0 comments
Show hidden files when searching
0 votes · 0 comments
Add button to remove subscription key
0 votes · 0 comments
No comments yet.