[wp-trac] [WordPress Trac] #62718: Automatic updater of WordPress always fails if FS_METHOD is ftpext since 6.6 with PHP 8.0+
WordPress Trac
noreply at wordpress.org
Fri Dec 20 04:31:26 UTC 2024
#62718: Automatic updater of WordPress always fails if FS_METHOD is ftpext since
6.6 with PHP 8.0+
-----------------------------+---------------------
Reporter: hideishi | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8
Component: Upgrade/Install | Version: 6.6
Severity: major | Resolution:
Keywords: | Focuses:
-----------------------------+---------------------
Changes (by dd32):
* component: General => Upgrade/Install
* milestone: Awaiting Review => 6.8
Comment:
Hi @hideishi and welcome to Trac, thanks for reporting this.
Looking into it, it appears to have been introduced in [58128] / #58281.
You're correct, that `WP_Filesystem()` should not be called without the
`$args` parameter, and that code similar to this should be employed:
https://github.com/WordPress/wordpress-
develop/blob/b8ecfbf9542198b1d88230221faeca6b71fa0ac7/src/wp-
includes/update.php#L1114-L1121
{{{
ob_start();
$credentials = request_filesystem_credentials( '' );
ob_end_clean();
if ( false === $credentials || ! WP_Filesystem( $credentials ) ) {
wp_trigger_error( __FUNCTION__, __( 'Could not access filesystem.'
) );
return;
}
}}}
Moving to 6.8 for resolution, but backporting should be considered. This
isn't critical, as it only affects a subset of sites (Those using FTP/SSH
with hard-coded credentials).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62718#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list