Skip to content

Invalid argument supplied for foreach() in WeatherForecast.php on line 85 #100

Closed
@DacotahHarvey

Description

@DacotahHarvey

Hello!

This issue has randomly started popping up on our website starting yesterday (February 7th)
I'm not entirely sure what the issue is, although my assumption is that OpenWeatherMap is returning some invalid data and the Constructor is trying to access something that doesn't exist.

Could this be caused by us going over our Rate Limits?

I am looking for a quick solution that we can apply as it is happening in both our test environment and on our Production environment.

Thank you for any help you can provide!

Full error message provided:

Warning: Invalid argument supplied for foreach() in /ourProject/lib/cmfcmf/openweathermap-php-api/Cmfcmf/OpenWeatherMap/WeatherForecast.php on line 85

Link to the line in question:

https://github.com/cmfcmf/OpenWeatherMap-PHP-Api/blob/master/Cmfcmf/OpenWeatherMap/WeatherForecast.php#L85

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions