Make WordPress Core

Opened 17 months ago

Closed 17 months ago

Last modified 17 months ago

#57907 closed defect (bug) (fixed)

Fix WP_Error in copy_dir()

Reported by: afragen's profile afragen Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.3 Priority: normal
Severity: normal Version: 5.7
Component: Filesystem API Keywords: has-patch commit
Focuses: Cc:


The WP_Error returned for ::dirlist() has an incorrect data argument. It should be based on the $from.

Change History (8)

This ticket was mentioned in PR #4222 on WordPress/wordpress-develop by @afragen.

17 months ago

The WP_Errror returned in copy_dir() for ::dirlist() seems to be incorrect. It should be $from not $to.

Trac ticket:

#2 @costdev
17 months ago

  • Milestone changed from Awaiting Review to 6.3

#3 @costdev
17 months ago

  • Keywords commit added

PR 4222 looks good to me. ::dirlist() is run on $from, so basename( $from ) is the correct thing to pass to the WP_Error object.

Marking for commit consideration.

#4 @afragen
17 months ago

  • Version changed from 5.1.1 to 5.7

#5 @pravinparmar2404
17 months ago

Tested the patch and it looks good to me.

#6 @SergeyBiryukov
17 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 55538:

Filesystem API: Return correct error data from copy_dir() if the directory listing failed.

The ::dirlist() method is run on the $from directory, so basename( $from ) is the correct thing to pass to the WP_Error object.

Follow-up to [50149].

Props afragen, costdev, pravinparmar2404.
Fixes #57907.

@SergeyBiryukov commented on PR #4222:

17 months ago

Thanks for the PR! Merged in r55538.

#8 @hellofromTonya
17 months ago

@SergeyBiryukov should this be reopened to backport to 6.2 branch? Never mind, re-read > I thought this was addressing the move dir introduced in 6.2. Sorry for the confusion.

Last edited 17 months ago by hellofromTonya (previous) (diff)
Note: See TracTickets for help on using tickets.