#19773 closed defect (bug) (fixed)

query.php paging block clarity

Reported by: kawauso Owned by: ryan
Priority: normal Milestone: 3.4
Component: Query Version: 3.3
Severity: normal Keywords: has-patch commit
Cc:

Description

A few simple changes to the // Paging block in wp-includes/query.php

  • $page is being checked with empty(), but is already passed through absint() which can only return an integer. Just using ! makes it a bit less confusing.
  • $pgstrt = ''; is redundant as it's overwritten on the following line
  • $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page']; is repeated, so moved outside the if/else block for readability.

Attachments (1)

19773.patch (824 bytes) - added by kawauso 17 months ago.

Download all attachments as: .zip

Change History (4)

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.4
  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [19724]:

Code cleanup in the paging block. Props kawauso. fixes #19773

Note: See TracTickets for help on using tickets.