diff --git a/wp-content/plugins/companion-auto-update/cau_emails.php b/wp-content/plugins/companion-auto-update/cau_emails.php index 19634c88..a04f3b81 100644 --- a/wp-content/plugins/companion-auto-update/cau_emails.php +++ b/wp-content/plugins/companion-auto-update/cau_emails.php @@ -193,7 +193,12 @@ function cau_list_theme_updates() { if( $config->onoroff != 'on' ) { - require_once ABSPATH . '/wp-admin/includes/update.php'; + // Check for required files + if ( !function_exists( 'get_theme_updates' ) ) { + require_once ABSPATH . 'wp-admin/includes/update.php'; + } + + // Begin $themes = get_theme_updates(); $list = array(); @@ -233,9 +238,15 @@ function cau_list_plugin_updates() { if( $config->onoroff != 'on' ) { - require_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); + require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; - if ( !function_exists( 'get_plugin_updates' ) ) require_once ABSPATH . 'wp-admin/includes/update.php'; + // Make sure get_plugin_updates() and get_plugins() are defined + if ( !function_exists( 'get_plugin_updates' ) OR !function_exists( 'get_plugins' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + require_once ABSPATH . 'wp-admin/includes/update.php'; + } + + // Begin $plugins = get_plugin_updates(); if ( !empty( $plugins ) ) { diff --git a/wp-content/plugins/companion-auto-update/companion-auto-update.php b/wp-content/plugins/companion-auto-update/companion-auto-update.php index 47b64814..f617f83c 100644 --- a/wp-content/plugins/companion-auto-update/companion-auto-update.php +++ b/wp-content/plugins/companion-auto-update/companion-auto-update.php @@ -4,7 +4,7 @@ * Plugin Name: Companion Auto Update * Plugin URI: http://codeermeneer.nl/portfolio/companion-auto-update/ * Description: This plugin auto updates all plugins, all themes and the wordpress core. - * Version: 3.8.6 + * Version: 3.8.7.1 * Author: Papin Schipper * Author URI: http://codeermeneer.nl/ * Contributors: papin diff --git a/wp-content/plugins/companion-auto-update/readme.txt b/wp-content/plugins/companion-auto-update/readme.txt index 0dbd2f7a..2ce44d00 100644 --- a/wp-content/plugins/companion-auto-update/readme.txt +++ b/wp-content/plugins/companion-auto-update/readme.txt @@ -5,7 +5,7 @@ Tags: auto, automatic, background, update, updates, updating, automatic updates, Requires at least: 3.6.0 Tested up to: 6.0 Requires PHP: 5.1 -Stable tag: 3.8.6 +Stable tag: 3.8.7.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -82,6 +82,12 @@ So obviously, some of you wondered what the difference would be between the defa == Changelog == += 3.8.7.1 (September 28, 2022) = +* Tweak: Extended function_exists check with get_plugins() for the fatal error when trying to send update emails + += 3.8.7 (September 12, 2022) = +* Fix: Fatal error when trying to send update emails + = 3.8.6 (August 11, 2022) = * Tweak: Code optimization for better performance