-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Labels
Description
Description
A missing variable causes a PHP warning during WordPress Core updates.
The error message is as follows:
PHP Warning: compact(): Undefined variable $new_version in [...]/wp-content/plugins/mainwp-child/class/class-mainwp-child-actions.php on line 655
The update itself is not interrupted and the notification email about the automatic update gets delivered normally.
Steps To Reproduce
- To be safe use a fresh install of WordPress
- Install MainWP Child plugin and activate
- Connect MainWP Child to a MainWP Dashboard (it won't work without this step)
- Install and activate the plugins "Core Rollback" and "WP Console"
- Use "Tools" > "Rollback Core" to select WordPress version 6.8.1 and click on "Rollback", when redirected press the button "Re-install version 6.8.1".
- To immediately force trigger the auto update process go to "Tools" > "WP Console" and run the following command:
wp_maybe_auto_update();You should immediately be shown the PHP warning message. - As an alternative you can also wait for wp cron to trigger the update process (takes up to 12 hours), but then you need
set in your
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );wp-config.phpfile. After the update/wp-content/debug.logfor the PHP warning message.
Expected behavior
Of course the expected behavior is the update going through without any PHP error messages or warnings.