#16759 closed defect (bug) (invalid)
$page is always set
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | |
| Component: | AtomPub | Version: | 3.0 |
| Severity: | trivial | Keywords: | has-patch |
| Cc: | bpetty |
Description
in wp-app.php
Attachments (2)
Change History (4)
- Cc bpetty added
- Component changed from General to AtomPub
- Keywords needs-refresh added
- Resolution set to invalid
- Status changed from new to closed
There's not really any way to guarantee that $page isn't passed as null when calling wp_atom_server::get_feed(). While I can't immediately see any location where it's called that won't result in $page not being set to null, this single extra check is only run once on any single request, so it's not a performance issue. I'm sure the check was added in there for a good reason originally, so it's really not worth removing it now and possibly breaking something without realizing it.
I do know that it is possible that a plugin is calling wp_atom_server::get_feed() with page passed as null, and that if a plugin wanted to specify a custom post type while relying on the default page specified in WP core, they would absolutely be required to pass null.
SergeyBiryukov — 9 months ago
comment:2
SergeyBiryukov — 9 months ago
- Keywords needs-refresh removed
- Milestone Unassigned deleted

fix