Skip to content

GetSites extension: Remove duplicate values from array#161

Merged
szepeviktor merged 1 commit intoszepeviktor:masterfrom
IanDelMar:array-unique
Feb 26, 2023
Merged

GetSites extension: Remove duplicate values from array#161
szepeviktor merged 1 commit intoszepeviktor:masterfrom
IanDelMar:array-unique

Conversation

@IanDelMar
Copy link
Copy Markdown
Contributor

This PR removes duplicate values from the $fields and $count array as the count($this->count) and count($this->fields) logic relies on unique values. This ensures that statements like count($this->count) === 1 are true even if there are two or more constant arrays with $args['count'] = true.

@szepeviktor szepeviktor merged commit 81c3abe into szepeviktor:master Feb 26, 2023
@szepeviktor
Copy link
Copy Markdown
Owner

Thank you.

@IanDelMar IanDelMar deleted the array-unique branch February 27, 2023 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants