Make WordPress Core

Opened 15 years ago

Closed 14 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 Owned by:
Priority: normal Milestone:
Component: General Version: 3.0
Severity: normal Keywords:
Cc: Focuses:

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 15 years ago.

Download all attachments as: .zip

Change History (5)

#1 @nacin
15 years ago

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

#2 @scribu
15 years ago

  • Cc scribu added

#3 @brianlayman
15 years ago

  • Cc Brian@… added
  • Keywords needs-patch added; has-patch removed
  • Version → 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
14 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed

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

Note: See TracTickets for help on using tickets.