kanboard / plugin-oauth2

Generic OAuth2 authentication plugin
MIT License
27 stars 33 forks source link

fix: groupsfilter is not ignored when filter value is empty #24

Closed asoete closed 4 years ago

asoete commented 4 years ago

Exploding an empty string results in an array with one item. array_filter can be used to fix this:

php > var_dump( explode(',', "") );
array(1) {
  [0]=> string(0) ""
}

php > var_dump( empty( explode(',', "") ) );
bool(false)

php > var_dump( array_filter( explode(',', "") ) );
array(0) {
}

php > var_dump( empty( array_filter( explode(',', "") ) ) );
bool(true)
fguillot commented 4 years ago

Sorry, I forgot to merge your PR. Same fix as #25.