Make WordPress Core

Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#16759 closed defect (bug) (invalid)

$page is always set

Reported by: hakre Owned by:
Milestone: Priority: lowest
Severity: trivial Version: 3.0
Component: AtomPub Keywords: has-patch
Focuses: Cc:

Description

in wp-app.php

Attachments (2)

clipboard.txt (383 bytes) - added by hakre 11 years ago.
fix
16759.patch (401 bytes) - added by SergeyBiryukov 9 years ago.

Download all attachments as: .zip

Change History (4)

@hakre
11 years ago

fix

#1 @bpetty
9 years ago

  • 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.

#2 @SergeyBiryukov
9 years ago

  • Keywords needs-refresh removed
  • Milestone Unassigned deleted
Note: See TracTickets for help on using tickets.