commerceguys / intl

A PHP internationalization library, powered by CLDR data.
MIT License
361 stars 45 forks source link

Fatal error fixed when getting not english locale in NumberFormatRepository #51

Closed marcortola closed 6 years ago

marcortola commented 6 years ago

https://github.com/commerceguys/intl/blob/a5d5cfbc1fe5ad7c7b3d8b870315987527629404/src/NumberFormat/NumberFormatRepository.php#L43

processDefinition method from NumberFormatRepository was throwing "Undefined index: en" when using other parameter different than "en".

I have added some test for validating this too.

bojanz commented 6 years ago

Thanks!

Tweaked a bit by removing the isset() for $definition['en'], that's always there.