Skip to content

PHP notices when trying to get a country #6

Description

@aosmakserato

I am getting php notices when trying to get a country code by a country name.

$country = (new Countries)->getByName('United Kingdom');

Notice: Undefined property: stdClass::$currency in .../vendor/rapidwebltd/php-countries/src/DataSources/MledozeCountriesJson.php on line 47
Notice: Undefined property: stdClass::$callingCode in ../vendor/rapidwebltd/php-countries/src/DataSources/MledozeCountriesJson.php on line 48

I am getting the same notices when I try to get all the countries.

$country = (new Countries)->all();

It looks like those 2 properties simply do not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions