Opened 4 weeks ago
Last modified 4 weeks ago
#64510 new defect (bug)
_wp_delete_all_temp_backups not accounting for direct filesystem access
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Upgrade/Install | Keywords: | reporter-feedback |
| Focuses: | Cc: |
Description
wp-includes/update.php:1156
ob_start();
$credentials = request_filesystem_credentials( '' );
ob_end_clean();
if ( false === $credentials || ! WP_Filesystem( $credentials ) ) {
wp_trigger_error( __FUNCTION__, __( 'Could not access filesystem.' ) );
return;
}
If request_filesystem_credentials() evaluates that the type == 'direct', it return boolean of true, therefore the condition ! WP_Filesystem( $credentials ) is met and the upgrade-temp-backup dir never gets emptied
Note: See
TracTickets for help on using
tickets.
Replying to i4nd90:
Hi there, welcome to WordPress Trac! Thanks for the ticket.
I could not reproduce the issue so far. In my testing,
request_filesystem_credentials()does returntruein this scenario, but thenWP_Filesystem( $credentials )also returnstrue(as it should on success), and the negative condition is not met.If the condition is met on your install, that means there was an error somewhere in
WP_Filesystem(), so some more investigation would be helpful here.