asteaguinity
Forum Replies Created
-
According to the official WP docs, this isn’t even surprising:
https://developer.ww.wp.xz.cn/reference/functions/is_plugin_active_for_network/#more-informationThe function just is not defined outside of admin areas, as the necessary include is only done automatically for admin areas.
Forum: Plugins
In reply to: [Companion Auto Update] Fatal error when trying to send update emailsThis seems to have done the trick, as no error showed up this time after the cron event was handled. I still find it quite strange, that get_plugin_updates() would already be defined, but the required get_plugins() function would not.
Anyway, thanks for your efforts!
Forum: Plugins
In reply to: [Companion Auto Update] Fatal error when trying to send update emailsSadly the new update does not seem to have resolved the issue. I guess you’ll have to extend your function_exists check to include get_plugins(), as get_plugin_updates() seems to be defined already.
Although it definitely feels strange that it would already be defined but the required get_plugins() function not.Here’s the changed stack trace:
[14-Sep-2022 18:05:02 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_plugins() in /wp-admin/includes/update.php:378 Stack trace: #0 /wp-content/plugins/companion-auto-update/cau_emails.php(250): get_plugin_updates() #1 /wp-content/plugins/companion-auto-update/cau_emails.php(9): cau_list_plugin_updates() #2 /wp-includes/class-wp-hook.php(307): cau_check_updates_mail() #3 /wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #4 /wp-includes/plugin.php(524): WP_Hook->do_action(Array) #5 /wp-cron.php(138): do_action_ref_array('cau_set_schedul...', Array) #6 {main} thrown in /wp-admin/includes/update.php on line 378