Skip to:

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2358 closed task (blessed) (fixed)

Should use strict type comparisons where possible

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by:
Milestone: 2.4 Priority: normal
Severity: normal Version: 2.1
Component: Tools - Code Improvements Keywords:


bbPress is coded to lead by example, and one place this falls short is by using loose comparisons in most places that would benefit from using strict ones.

Since all of bbPress intentionally typecasts return values and variables, strict comparisons will help reveal any that are not, but should be.

This task will be completed in several commits, over time.

Change History (5)

#1 @johnjamesjacoby
11 years ago

In 4995:

Use strict comparisons where possible (excluding the converter code, as it needs dedicated testing.) See #2358.

#2 @johnjamesjacoby
11 years ago

In 5000:

Revert part of r4995 that introduced strict comparisons in bbp_get_time_since() against return values of floor(), which returns a float. See #2358.

#3 @johnjamesjacoby
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

This looks mostly done to me. Closing as fixed. Future enhancements should reference this ticket.

#4 @johnjamesjacoby
11 years ago

In 5021:

Use string values when comparing against super globals. Regression introduced in r4995. See #2358.

#5 @johnjamesjacoby
11 years ago

In 5022:

Use strict comparisons in bbp_toggle_topic_handler(). See #2358.

Note: See TracTickets for help on using tickets.