auraphp/Aura.Filter

Bool filters and rules do not handle non-scalar values properly

Closed this issue · 2 comments

There is no code to handle values that are non-scalar when sanitizing or validating booleans, instead it tries to pass the value directly through assuming it is scalar and throws php warnings

PHPUnit_Framework_Error_Warning: trim() expects parameter 1 to be string, array given in aura/filter/src/Rule/AbstractBool.php on line 45

Hey @auroraeosrose ,

Thank you for reporting the issue. May be you could see if the PR #74 fits. or add any additional test case as needed ?

Thank you.

Looks good, thanks!