Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#19773 closed defect (bug) (fixed)

query.php paging block clarity

Reported by: kawauso's profile kawauso Owned by: ryan's profile ryan
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.3
Component: Query Keywords: has-patch commit
Focuses: 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 11 years ago.

Download all attachments as: .zip

Change History (4)

@kawauso
11 years ago

#1 @SergeyBiryukov
11 years ago

  • Keywords commit added

#2 @ryan
11 years ago

  • Milestone changed from Awaiting Review to 3.4

#3 @ryan
11 years ago

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