Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#18392 closed defect (bug) (duplicate)

When checking to see if terms are in the cache, if statement should check to see if exactly false, not empty

Reported by: wpdavis's profile wpdavis Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: General Keywords:
Focuses: Cc:

Description

In two instances, core checks to see if terms are in the cache by seeing if $terms is empty. Instead, use ===, as checking if is empty can return a false positive and there are no terms for the object.

Attachments (1)

terms.patch (894 bytes) - added by wpdavis 13 years ago.

Download all attachments as: .zip

Change History (5)

@wpdavis
13 years ago

#1 @nacin
13 years ago

Sounds like a duplicate of #16505, actually. And probably storing array() versus false.

#2 @scribu
13 years ago

  • Cc scribu added

#3 @brianlayman
13 years ago

  • Cc Brian@… added
  • Keywords needs-patch added; has-patch removed
  • Version set to 3.0

in #16505 wpdavis does actually confirm that an an empty array what is returned, not FALSE. It sounds like both of these tickets should be addressed. Specifically this needs to be evaluated after #16505 is fixed.

So this should be set to future release like #16505

#4 @wonderboymusic
12 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Dupe of #16505 which has a patch with one more occurrence that needed fixin'

Note: See TracTickets for help on using tickets.