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 (maybe) triggered by ActivityPub plugin #1007

Closed
rghedin opened this issue Nov 21, 2024 · 3 comments
Closed

PHP Warnings (maybe) triggered by ActivityPub plugin #1007

rghedin opened this issue Nov 21, 2024 · 3 comments
Labels
[Type] Bug Something isn't working

Comments

@rghedin
Copy link

rghedin commented Nov 21, 2024

Quick summary

I've been trying to track down what plugin is causing a surge in “PHP Warning” erros in my WP instance, hosted at WordPress.com.

I set up a staging site and deactivated one plugin at a time, checking out how they affect my logs. After deactivating ActivityPub plugin, the error messages disappeared.

They look like this:

Image

Transcription:

Message: PHP Warning: foreach() argument must be of type array|object, null given in /wordpress/core/6.7/wp-admin/includes/plugin.php on line 1853
Timestamp: 2024-11-20T20:52:05.000Z
Type: core
Name: 6.7
File: /wordpress/core/6.7/wp-admin/includes/plugin.php
Line: 1853

I'm really not sure if they are caused by AP plugin; it's just my main suspicion. I also suspect it may be something related to the WordPress.com interventions with MU plugin and Jetpack, which causes some headaches from time to time.

I hope this report helps anyway.

Steps to reproduce

  1. Activate AP plugin.
  2. Wait.
  3. Check “Logs” (not sure if it's available in self-manage WP or only in Business WP.com accounts).

What you expected to happen

No errors appearing.

What actually happened

PHP Warnings appear frequently.

Impact

Some (< 50%)

Available workarounds?

No but the platform is still usable

Logs or notes

No response

@rghedin rghedin added [Type] Bug Something isn't working Needs triage labels Nov 21, 2024
@pfefferle
Copy link
Member

phew... that is hard to debug, but I will keep my eyes open if I can see similar issues!

@obenland
Copy link
Member

obenland commented Dec 2, 2024

Looks like this gets triggered within remove_menu_page() when the global $menu is null. I've not been able to re-create it.

https://github.com/WordPress/wordpress-develop/blob/6.7/src/wp-admin/includes/plugin.php#L1853

@rghedin We'll keep an eye out for it but will close for now since it's not reproducible. Please feel free to re-open when that changes!

@obenland obenland closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2024
@rghedin
Copy link
Author

rghedin commented Dec 5, 2024

Maybe it isn't related to AP plugin, after all. I searched my WordPress theme for remove_menu_page() references and found a couple on functions.php. Probably the culprit.

Sorry about the false alarm, @obenland!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants