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

PHP warnings when loading the report screen the second time #56

Open
roytanck opened this issue Feb 28, 2024 · 3 comments
Open

PHP warnings when loading the report screen the second time #56

roytanck opened this issue Feb 28, 2024 · 3 comments
Assignees

Comments

@roytanck
Copy link
Owner

Warning: Undefined property: stdClass::$version in [...]/wp-content/plugins/plugin-report/rt-plugin-report.php on line 495
Warning: Undefined property: stdClass::$version in [...]/wp-content/plugins/plugin-report/rt-plugin-report.php on line 498
Warning: Undefined property: stdClass::$version in [...]/wp-content/plugins/plugin-report/rt-plugin-report.php on line 514
@roytanck roytanck self-assigned this Feb 28, 2024
@roytanck
Copy link
Owner Author

This appears to only happen with the Search & Filter Pro plugin, which for some reason does get info returned from the WP repo, even though the plugin is not listed there. The returned object appears to not be be valid (I'm seeing large portions of HTML). The PHP warnings can quickly be fixed by checking whether $report['repo_info'] is an array (using is_array) on line 494.

Perhaps the check can be done earlier, immediately after the call finishes. This would save us the trouble of storing and caching the faulty info.

@Zodiac1978
Copy link
Contributor

@rmorse
Copy link

rmorse commented Oct 8, 2024

Thanks for tagging me @Zodiac1978

I've just added that to version 2 and version 3 of our plugin.

Update with the fix for v3 will be out in a couple of days.

No ETA yet on the v2 update, likely in a couple of weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants