WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 years ago

#10204 closed enhancement (worksforme)

Switch to using isset and typed comparison rather than empty

Reported by: Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: General Keywords:
Focuses: Cc:

Description

There are multitudes of areas in WP where we're using empty to test for a variable, and where we'd be better of testing for isset($var) && $var !== false instead.

It is a tad bit faster, and it prevents bugs along the lines of #10203

Change History (1)

comment:1 dd323 years ago

  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Please file bug reports for actual issues rather than broad things which we might be doing wrong somewhere.

Note: See TracTickets for help on using tickets.