This looks like an issue with the data provided. That line is checking for the wind speed which should be there but it probably empty. I’ll add more error checking in a future version to minimize these errors.
It will most likely fix itself when the weather updates. If you could post the city or city id you are using it would help me debug a bit more.
Thanks.
Thanks Hal,
It’s a great plugin and we really love using it. Any way to hide PHP Notices (as opposed to errors)?
The City we’re using is Avoca, PA 5178741.
Thanks again.
Hi Hal
Same problem here:
Notice: Undefined property: stdClass::$deg in /…/plugins/awesome-weather/awesome-weather.php on line 273
City is Vaison-la-Romaine (France), 2971154
Widget displays fine, but with the error message above which is a petty. May be error messages could be suppressed ?
Cheers, Marc
@wmaurojr this page shows how you can turn off PHP notices: http://stackoverflow.com/questions/2867057/how-do-i-turn-off-php-notices
@marc.fries I looked at the weather data and the error should be gone. If not try adding ?clear_awesome_widget
to the end of your URL.
I have a note for a future release to better check if the variables exist before trying to use them.
Hello again,
Getting this now:
Notice: Undefined property: stdClass::$name in /home/…/…/…/wp-content/plugins/awesome-weather/awesome-weather.php on line 267
Notice: Undefined property: stdClass::$list in /home/…/…/…/wp-content/plugins/awesome-weather/awesome-weather.php on line 379
I saw you mentioned turning off php notices–if possible I’d prefer to turn them off for the plugin but not the rest of the site (ie not via php.ini). Would you suggest editing the plugin file and adding the code back each time there’s an update?
Thanks
Hi @wmaurojr
Are you on version 1.5.7 of my plugin?
I guess if you don’t want to turn off the display of notices then that would be your best bet.