Upgrade/Install: Return WP_Error when source files cannot be found.
Some checks failed
Coding Standards / PHP coding standards (push) Waiting to run
Coding Standards / JavaScript coding standards (push) Waiting to run
Coding Standards / Slack Notifications (push) Blocked by required conditions
Coding Standards / Failed workflow tasks (push) Blocked by required conditions
End-to-end Tests / Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }} (false) (push) Waiting to run
End-to-end Tests / Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }} (true) (push) Waiting to run
End-to-end Tests / Slack Notifications (push) Blocked by required conditions
End-to-end Tests / Failed workflow tasks (push) Blocked by required conditions
JavaScript Tests / QUnit Tests (push) Waiting to run
JavaScript Tests / Slack Notifications (push) Blocked by required conditions
JavaScript Tests / Failed workflow tasks (push) Blocked by required conditions
Performance Tests / Performance tests ${{ matrix.memcached && '(with memcached)' || '' }} (false) (push) Waiting to run
Performance Tests / Performance tests ${{ matrix.memcached && '(with memcached)' || '' }} (true) (push) Waiting to run
Performance Tests / Slack Notifications (push) Blocked by required conditions
Performance Tests / Failed workflow tasks (push) Blocked by required conditions
PHP Compatibility / Check PHP compatibility (push) Waiting to run
PHP Compatibility / Slack Notifications (push) Blocked by required conditions
PHP Compatibility / Failed workflow tasks (push) Blocked by required conditions
Test Build Processes / Core running from ${{ matrix.directory }} (build, ubuntu-latest, ${{ github.event_name == 'pull_request' && true || '' }}, true) (push) Waiting to run
Test Build Processes / Core running from ${{ matrix.directory }} (build, windows-latest) (push) Waiting to run
Test Build Processes / Core running from ${{ matrix.directory }} (src, ubuntu-latest) (push) Waiting to run
Test Build Processes / Core running from ${{ matrix.directory }} (src, windows-latest) (push) Waiting to run
Test Build Processes / Core running from ${{ matrix.directory }} (build, macos-latest) (push) Waiting to run
Test Build Processes / Core running from ${{ matrix.directory }} (src, macos-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (build, ubuntu-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (build, windows-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (src, ubuntu-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (src, windows-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (build, macos-latest) (push) Waiting to run
Test Build Processes / Gutenberg running from ${{ matrix.directory }} (src, macos-latest) (push) Waiting to run
Test Build Processes / Slack Notifications (push) Blocked by required conditions
Test Build Processes / Failed workflow tasks (push) Blocked by required conditions
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 7.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 7.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 7.4, example.org:8889) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 8.0, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 8.1, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 8.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 8.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, false, ubuntu-latest, 8.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 7.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 7.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 7.4, example.org:8889) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 8.0, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 8.1, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 8.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 8.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, false, true, ubuntu-latest, 8.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, true, false, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 5.7, true, true, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 7.2, true, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 7.3, true, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 7.4, true, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 8.0, true, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 8.1, true, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 8.2, true, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 8.3, true, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, false, ubuntu-latest, 8.4, true, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 7.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 7.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 8.0, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 8.1, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 8.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 8.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.0, false, true, ubuntu-latest, 8.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, false, ubuntu-latest, 7.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, false, ubuntu-latest, 7.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, false, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, false, ubuntu-latest, 8.0, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, false, ubuntu-latest, 8.1, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, false, ubuntu-latest, 8.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, false, ubuntu-latest, 8.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, false, ubuntu-latest, 8.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, true, ubuntu-latest, 7.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, true, ubuntu-latest, 7.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, true, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, true, ubuntu-latest, 8.0, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, true, ubuntu-latest, 8.1, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, true, ubuntu-latest, 8.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, true, ubuntu-latest, 8.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.1, false, true, ubuntu-latest, 8.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, false, ubuntu-latest, 7.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, false, ubuntu-latest, 7.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, false, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, false, ubuntu-latest, 8.0, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, false, ubuntu-latest, 8.1, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, false, ubuntu-latest, 8.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, false, ubuntu-latest, 8.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, false, ubuntu-latest, 8.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, true, ubuntu-latest, 7.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, true, ubuntu-latest, 7.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, true, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, true, ubuntu-latest, 8.0, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, true, ubuntu-latest, 8.1, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, true, ubuntu-latest, 8.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, true, ubuntu-latest, 8.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.2, false, true, ubuntu-latest, 8.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, false, ubuntu-latest, 7.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, false, ubuntu-latest, 7.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, false, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, false, ubuntu-latest, 8.0, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, false, ubuntu-latest, 8.1, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, false, ubuntu-latest, 8.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, false, ubuntu-latest, 8.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, false, ubuntu-latest, 8.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, true, ubuntu-latest, 7.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, true, ubuntu-latest, 7.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, true, ubuntu-latest, 7.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, true, ubuntu-latest, 8.0, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, true, ubuntu-latest, 8.1, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, true, ubuntu-latest, 8.2, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, true, ubuntu-latest, 8.3, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mysql, 8.3, false, true, ubuntu-latest, 8.4, example.org) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 7.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 7.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 8.0) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 8.1) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 8.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 8.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, false, ubuntu-latest, 8.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 7.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 7.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 8.0) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 8.1) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 8.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 8.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.11, false, true, ubuntu-latest, 8.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 7.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 7.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 8.0) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 8.1) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 8.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 8.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, false, ubuntu-latest, 8.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 7.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 7.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 8.0) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 8.1) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 8.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 8.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.4, false, true, ubuntu-latest, 8.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 7.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 7.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 8.0) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 8.1) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 8.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 8.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, false, ubuntu-latest, 8.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 7.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 7.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 8.0) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 8.1) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 8.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 8.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 10.6, false, true, ubuntu-latest, 8.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 7.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 7.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 8.0) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 8.1) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 8.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 8.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, false, ubuntu-latest, 8.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 7.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 7.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.0) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.1) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.2) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.3) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, false, true, ubuntu-latest, 8.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, true, false, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / PHP ${{ matrix.php }} (mariadb, 11.2, true, true, ubuntu-latest, 7.4) (push) Has been cancelled
PHPUnit Tests / Slack Notifications (push) Has been cancelled
PHPUnit Tests / Failed workflow tasks (push) Has been cancelled

Fixes a fatal error in `array_keys()` (PHP 8.0+) as `$wp_filesystem->dirlist()` will return `false` when the source directory doesn't exist or becomes unreadable for some reason.

Props: verygoode, lifelightweb, da5f656f, costdev, afragen, azaozz
Fixes #61114

git-svn-id: https://develop.svn.wordpress.org/trunk@59257 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2024-10-18 23:35:02 +00:00
parent 39bda90823
commit b1dade3c03
2 changed files with 116 additions and 2 deletions

View File

@ -204,6 +204,7 @@ class WP_Upgrader {
$this->strings['mkdir_failed'] = __( 'Could not create directory.' );
$this->strings['incompatible_archive'] = __( 'The package could not be installed.' );
$this->strings['files_not_writable'] = __( 'The update cannot be installed because some files could not be copied. This is usually due to inconsistent file permissions.' );
$this->strings['dir_not_readable'] = __( 'A directory could not be read.' );
$this->strings['maintenance_start'] = __( 'Enabling Maintenance mode…' );
$this->strings['maintenance_end'] = __( 'Disabling Maintenance mode…' );
@ -558,7 +559,13 @@ class WP_Upgrader {
$remote_source = $args['source'];
$local_destination = $destination;
$source_files = array_keys( $wp_filesystem->dirlist( $remote_source ) );
$dirlist = $wp_filesystem->dirlist( $remote_source );
if ( false === $dirlist ) {
return new WP_Error( 'source_read_failed', $this->strings['fs_error'], $this->strings['dir_not_readable'] );
}
$source_files = array_keys( $dirlist );
$remote_destination = $wp_filesystem->find_folder( $local_destination );
// Locate which directory to copy to the new folder. This is based on the actual folder holding the files.
@ -605,7 +612,13 @@ class WP_Upgrader {
// Has the source location changed? If so, we need a new source_files list.
if ( $source !== $remote_source ) {
$source_files = array_keys( $wp_filesystem->dirlist( $source ) );
$dirlist = $wp_filesystem->dirlist( $source );
if ( false === $dirlist ) {
return new WP_Error( 'new_source_read_failed', $this->strings['fs_error'], $this->strings['dir_not_readable'] );
}
$source_files = array_keys( $dirlist );
}
/*

View File

@ -948,6 +948,107 @@ class Tests_Admin_WpUpgrader extends WP_UnitTestCase {
);
}
/**
* Tests that `WP_Upgrader::install_package()` returns a WP_Error object
* when the source directory's file list cannot be retrieved.
*
* @ticket 61114
*
* @covers WP_Upgrader::install_package
*/
public function test_install_package_should_return_wp_error_when_source_directory_file_list_cannot_be_retrieved() {
self::$instance->generic_strings();
self::$upgrader_skin_mock
->expects( $this->once() )
->method( 'feedback' )
->with( 'installing_package' );
self::$wp_filesystem_mock
->expects( $this->once() )
->method( 'dirlist' )
->willReturn( false );
$args = array(
'source' => '/',
'destination' => '/',
);
$actual = self::$instance->install_package( $args );
$this->assertWPError(
$actual,
'WP_Upgrader::install_package() did not return a WP_Error object'
);
$this->assertSame(
'source_read_failed',
$actual->get_error_code(),
'Unexpected WP_Error code'
);
}
/**
* Tests that `WP_Upgrader::install_package()` returns a WP_Error object
* when the source directory is filtered and its file list cannot be retrieved.
*
* @ticket 61114
*
* @covers WP_Upgrader::install_package
*
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function test_install_package_should_return_wp_error_when_a_filtered_source_directory_file_list_cannot_be_retrieved() {
define( 'FS_CHMOD_DIR', 0755 );
self::$instance->generic_strings();
self::$upgrader_skin_mock
->expects( $this->once() )
->method( 'feedback' )
->with( 'installing_package' );
$first_source = array(
'subdir' => array(
'name' => 'subdir',
'type' => 'd',
'files' => array( 'subfile.php' ),
),
);
self::$wp_filesystem_mock
->expects( $this->exactly( 2 ) )
->method( 'dirlist' )
->willReturn( $first_source, false );
$args = array(
'source' => '/',
'destination' => '/',
);
// Filter the source to something else.
add_filter(
'upgrader_source_selection',
static function () {
return '/not_original_source/';
}
);
$actual = self::$instance->install_package( $args );
$this->assertWPError(
$actual,
'WP_Upgrader::install_package() did not return a WP_Error object'
);
$this->assertSame(
'new_source_read_failed',
$actual->get_error_code(),
'Unexpected WP_Error code'
);
}
/**
* Tests that `WP_Upgrader::install_package()` adds a trailing slash to
* the source directory of a single file.