Opened 20 months ago
Closed 20 months ago
#18774 closed defect (bug) (fixed)
Notice in /wp-admin/upload.php
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | Upload | Version: | 3.2.1 |
| Severity: | trivial | Keywords: | has-patch |
| Cc: |
Description
Hello
wp-admin/upload.php
line 25 & 28 &30, the $post_ids var is set but only in IF statments.
so if none of this IF is TRUE we got "Notice: Undefined variable: post_ids in /wp-admin/upload.php on line XXX"
lines affected : 93, 100, 103, 110, 113, 120.
How to reproduce :
- go to http://website.com/wp-admin/upload.php
- in "bulk actions" choose "delete permanently" without checking any checkbox
- click "Apply"
-> Notices !
Attachments (2)
Change History (8)
comment:1
solarissmoke — 20 months ago
comment:2
solarissmoke — 20 months ago
- Keywords has-patch added
comment:3
SergeyBiryukov — 20 months ago
- Milestone changed from Awaiting Review to 3.3
Won't that interfere with the find_detached and attach actions?
SergeyBiryukov — 20 months ago
comment:5
in reply to:
↑ 4
SergeyBiryukov — 20 months ago
Replying to ryan:
Won't that interfere with the find_detached and attach actions?
Indeed. We only need to check for $post_ids where it's actually used. Done in 18774.patch.
Note: See
TracTickets for help on using
tickets.

In wp-admin/edit.php and elsewhere there is a check for empty bulk edits which just redirects back to the page you were on - I think we should be doing the same here.