Feature Request #21

Use strict-comparison where possible

Added by Geoffrey Sneddon 905 days ago. Updated 429 days ago.

Status:New Start:2008-02-04
Priority:Low Due date:
Assigned to:Ryan McCue % Done:

0%

Category:Miscellaneous
Target version:1.3

Description

Work started on this in r944, but that only touched == and != leaving implicit comparison untouched (e.g., if ($var). This probably means searching through simplepie.inc for all if, for, and while statements. Not fun.

However lacking in excitement this is, it needs to be done — bugs have already slipped through because of this.

Associated revisions

Revision 1001
Added by Ryan McCue 667 days ago

Change some lazy comparisons to strict. See #21

History

Updated by Ryan McCue 667 days ago

  • Assigned to set to Ryan McCue

Assigning to me, I'm on the hunt.

Updated by Ryan McCue 667 days ago

I'm seeing a lot of ifs that use a variable that is either a boolean or an object. I'm thinking that the best way to handle this is either is_object($x) or !!$x (which makes it a boolean). I'm not going to change those though, until I get clarification.

Updated by Geoffrey Sneddon 667 days ago

Examples? If it's an object or false, could you not just do !== false?

Updated by Geoffrey Sneddon 429 days ago

  • Target version changed from 1.2 to 1.3

Also available in: Atom PDF