Skip to content

Bugfix: In market_source, a form key might be incorrectly identified #27

Merged
merged 1 commit into from Mar 27, 2012
Commits on Mar 9, 2012
  1. Bugfix: In market_source, a form key might be identified as matching …

    Benjamin Clark committed Mar 9, 2012
    …the qs key when a (int) 0 form key is found.
    
    TIL that when using the equal operator (==) to compare a string to an integer, the string is converted to an integer -- and not the other way around.
    
    This means that if we stumble upon a (int) 0 form key in _market_source_form_find_element(), it will always match TRUE against the qs key we're trying to find. This will result in form submission chaos.
    
    The fix, then, is to use the identical comparison operator, ===.
Something went wrong with that request. Please try again.