Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HenrikBoChristoffersen opened this issue Jun 29, 2023 · 5 comments · Fixed by #34
Open
Assignees
Labels
first time contributor Issue or PR opened by a first-time contributor to the repository [Needs] Testing [Priority] Low [Status] In Progress Tracking issues with work in progress [Type] Bug Something isn't working
Milestone

Comments

@HenrikBoChristoffersen
Copy link

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 jaz-on added [Type] Bug Something isn't working first time contributor Issue or PR opened by a first-time contributor to the repository [Needs] Testing [Priority] Low labels Jul 20, 2023
@jaz-on
Copy link
Member

jaz-on commented Aug 1, 2023

@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?

@jaz-on jaz-on self-assigned this Aug 1, 2023
@HenrikBoChristoffersen
Copy link
Author

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

image

@HenrikBoChristoffersen
Copy link
Author

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 jaz-on added this to the 3.9 milestone Aug 3, 2023
@jaz-on jaz-on modified the milestones: 3.9, 3.8.14 Aug 8, 2023
jaz-on added a commit to jaz-on/live-weather-station that referenced this issue Aug 8, 2023
…aintainability (renaming variables, rewriting docstring...) Linked to Weather-Station-Software#17
@jaz-on jaz-on closed this as completed in #34 Aug 8, 2023
jaz-on added a commit that referenced this issue Aug 8, 2023
@jaz-on jaz-on reopened this Aug 8, 2023
@jaz-on
Copy link
Member

jaz-on commented Aug 8, 2023

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 jaz-on added the [Status] In Progress Tracking issues with work in progress label Aug 8, 2023
@jaz-on
Copy link
Member

jaz-on commented Sep 6, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first time contributor Issue or PR opened by a first-time contributor to the repository [Needs] Testing [Priority] Low [Status] In Progress Tracking issues with work in progress [Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants