Opened 17 years ago
Closed 17 years ago
#7904 closed defect (bug) (fixed)
get_attached_file bug
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.7 | Priority: | high |
Severity: | blocker | Version: | 2.7 |
Component: | Administration | Keywords: | get_attached_file |
Focuses: | Cc: |
Description
From the very last trunk of WordPress 2.7, i found a bug in "get_attached_file" function.
For my specific import, i have
(at step0)
this->file >>> C:
Vn
wp27/wp-content/uploads/2008/10/csv-semicolon-sample1csv13.import <<<
and have then with get_attached_file function (at step1)
this->file >>> C:\Vn\wp27/wp-content/uploads/C:\Vn\wp27/wp-content/uploads/2008/10/csv-semicolon-sample1csv13.import <<<
As you can see when retrieving the file name, the string "C:\Vn\wp27/wp-content/uploads/" is duplicated
My code is working on 2.6.2, not on 2.7.
Code is very similar to "wordpress" importer.
Change History (7)
#4
@
17 years ago
#7118 ?
Looks to be the one i was thinking of most likely
Hadnt seen that one yet, Looks to be the same issue, But i'm pretty sure i've seen a ticket with /home/blahblahblah/home/blahblahblah/.. Actually.. I dont think a trac ticket was filed, It was someone who emailed me about the problem with a plugin of mine(add-from-server) and the issue suddenly disapeared when i went to debug it.. The code in question was a direct copy-paste of the WP upload handling code of the time.
I dont think the bug is in get_attached_file() but rather, one of the functions which inserts the attachment.
Theres another ticket with a similar problem, i believe it was related to realpath() (But i cant find the ticket)