rinvex / countries

Rinvex Country is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.
https://rinvex.com
MIT License
1.66k stars 208 forks source link

TypeError: current() expects parameter 1 to be array, null given #65

Closed zakdances closed 3 years ago

zakdances commented 7 years ago

When trying getCallingCode() on a country instance:

TypeError: current() expects parameter 1 to be array, null given in /var/www/html/myproject/vendor/rinvex/country/src/Country.php:560
Stack trace:
Omranic commented 3 years ago

This should be fixed now, an empty array should be returned from get method call instead of null.

https://github.com/rinvex/countries/blob/4614e0283c16234c48819000690d37210407375b/src/Country.php#L549