Weather-Station-Software / live-weather-station

Display on your WordPress site, in many elegant ways, the meteorological data collected by public or personal weather stations.
https://weather.station.software/
GNU General Public License v2.0
7 stars 2 forks source link

Environment.php on line 754 Warning: Undefined property: stdClass::$slug in #17

Open HenrikBoChristoffersen opened 1 year ago

HenrikBoChristoffersen commented 1 year ago

Hi Jason

Environment.php on line 754 Warning: Undefined property: stdClass::$slug in

I get above error in the control panel after the upgrade to latest release of weather station

jaz-on commented 1 year ago

@HenrikBoChristoffersen sorry for the late reply. Can you provide a bit more details? Do you still have this warning? I didn't see it on my side during my tests, is there any chance you screenshotted the error?

HenrikBoChristoffersen commented 1 year ago

I changed the following in line 754 to fix my problem. The issue occurred in the control panel.

image

HenrikBoChristoffersen commented 1 year ago

The issue is that the function is called with an blank array or an array which is not populated correctly see the $item. Wordpress introduced a check when you fetch a value from an array where it throws an error if the value do not exist. I only solved the symptom by adding an @ in front of the array, not the core problem. why is this array empty.

jaz-on commented 1 year ago

Quick follow-up @HenrikBoChristoffersen: I committed and merged a fix. This needs to be tested as part of the future 3.8.14 version (FYI the review and validation of 3.8.13 is pending on WordPress.org).

jaz-on commented 11 months ago

Hello @HenrikBoChristoffersen I just released version 3.8.14, would you mind testing it and providing feedback if it resolves the error you reported? Many thanks