1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Implemented XenForo_Input to support boolean cleaning

Discussion in 'Closed Suggestions' started by tyteen4a03, Jun 6, 2013.

  1. tyteen4a03

    tyteen4a03 Well-Known Member

    Just for convenience's sake.
    cclaerhout likes this.
  2. cclaerhout

    cclaerhout Well-Known Member

    You can use this workaround:
    $yourInputVariable filter_var($yourInputVariableFILTER_VALIDATE_BOOLEAN);
  3. tyteen4a03

    tyteen4a03 Well-Known Member

    Hell, I can even do (bool) $var. :p
  4. cclaerhout

    cclaerhout Well-Known Member

    If the input comes from a javascript it can be a problem (unmified: true/fase, minified: 1/0). Bool will no nothing. You can find several explanations on the web.
  5. Mike

    Mike XenForo Developer Staff Member

    I already added this. :)
    tyteen4a03 and cclaerhout like this.

Share This Page