Opened 19 years ago
Closed 19 years ago
#6073 closed defect (bug) (fixed)
wp_upload_dir() produces incorrect URL if upload_path is empty
| Reported by: | tellyworth | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.5 |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
There was a bug in the patch at #5953. If the upload_path option is empty, it produces attachment URLs like http://example.com//2008/03/foo.jpg instead of http://example.com/wp-content/uploads/2008/03/foo.jpg. The filesystem path is correct, just the URL is broken. The enclosed patch fixes it.
I added a new unit test for the specific case, test_upload_dir_empty():
http://svn.automattic.com/wordpress-tests/wp-testcase/test_uploads.php
Attachments (1)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Fixed in:
[7134] Deal correctly with empty upload_path option. Hat tip: tellyworth.