Index: trunk/extensions/Validator/includes/manipulations/ParamManipulationBoolean.php |
— | — | @@ -28,7 +28,10 @@ |
29 | 29 | * @since 0.4 |
30 | 30 | */ |
31 | 31 | public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
32 | | - $value = in_array( $value, array( 'yes', 'on' ) ); |
| 32 | + // When the value defaulted to a booeal, there is no need for this manipulation. |
| 33 | + if ( !is_bool( $value ) || !$parameter->wasSetToDefault() ) { |
| 34 | + $value = in_array( $value, array( 'yes', 'on' ) ); |
| 35 | + } |
33 | 36 | } |
34 | 37 | |
35 | 38 | } |
\ No newline at end of file |