valu-digital / wp-graphql-polylang

WPGraphQL Polylang Extension for WordPress
https://packagist.org/packages/valu/wp-graphql-polylang
GNU General Public License v2.0
124 stars 20 forks source link

Typo causing default language code enum to be registered even if codes already found #53

Closed huesy closed 3 years ago

huesy commented 3 years ago

When registering language codes, there is a small typo that forces the WordPress default locale to be added to the language code enums even if Polylang codes were already added.

esamattis commented 3 years ago

Thanks! Uh,empty() seems really dangerous tool since it hides the undefined variable -notices which would have been caught by the tests. Better use count() next time...