Upgrade/Install: Initialize the local $checkout variable in WP_Automatic_Updater::is_vcs_checkout().

This avoids an `Undefined variable $checkout` PHP warning if all of the directories checked for access are disallowed due to the PHP `open_basedir` restrictions.

Follow-up to [55425].

Props jqz, costdev, audrasjb.
Fixes #58563.

git-svn-id: https://develop.svn.wordpress.org/trunk@56124 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2023-07-02 10:33:18 +00:00
parent e635540d1c
commit 62b286f9b2
2 changed files with 25 additions and 0 deletions

View File

@@ -148,6 +148,7 @@ class WP_Automatic_Updater {
}
$check_dirs = array_unique( $check_dirs );
$checkout = false;
// Search all directories we've found for evidence of version control.
foreach ( $vcs_dirs as $vcs_dir ) {