Index: trunk/extensions/Validator/includes/manipulations/ParamManipulationBoolean.php |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
32 | 32 | // When the value defaulted to a boolean, there is no need for this manipulation. |
33 | 33 | if ( !is_bool( $value ) || !$parameter->wasSetToDefault() ) { |
34 | | - $value = in_array( strtolower( $value ), array( 'yes', 'on' ) ); |
| 34 | + $value = in_array( strtolower( $value ), array( 'yes', 'on', '1' ) ); |
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
Index: trunk/extensions/Validator/includes/Parameter.php |
— | — | @@ -613,7 +613,7 @@ |
614 | 614 | break; |
615 | 615 | case self::TYPE_BOOLEAN: |
616 | 616 | // TODO: work with list of true and false values and i18n. |
617 | | - $criteria[] = new CriterionInArray( 'yes', 'no', 'on', 'off' ); |
| 617 | + $criteria[] = new CriterionInArray( 'yes', 'no', 'on', 'off', '1', '0' ); |
618 | 618 | break; |
619 | 619 | case self::TYPE_CHAR: |
620 | 620 | $criteria[] = new CriterionHasLength( 1, 1 ); |