[wp-trac] [WordPress Trac] #19800: Media & WXR Uploads: Inaccurate error reporting because move_uploaded_file() fails to return false.

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 11 00:04:27 UTC 2012


#19800: Media & WXR Uploads: Inaccurate error reporting because
move_uploaded_file() fails to return false.
--------------------------+-----------------------------
 Reporter:  emhr          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Upload        |    Version:  3.3.1
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 Steps to reproduce:
 Current month directory exists in uploads directory hierarchy but is not
 writable.

 Case-1 Upload a new media item. Data stored in database but file is not
 uploaded.

 Case-2 Upload a WXR import file using the WP importer plugin. Plugin
 reports it's fallback error message: "This does not appear to be a WXR
 file, missing/invalid WXR version number" even if the WXR file has a valid
 wxr version number. The import fails.

 Expected behavior:
 The uploader should return the following error, "The uploaded file could
 not be moved to"…path

 Solution:
 Pass precise path to wp_tempnam() instead of default

 Bug Since: #18206

 Related: #19720

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19800>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list