@@ -33,8 +33,8 @@ class sfValidatorBoolean extends sfValidatorBase
3333 */
3434 protected function configure ($ options = array (), $ messages = array ())
3535 {
36- $ this ->addOption ('true_values ' , array ('true ' , 't ' , 'yes ' , 'y ' , 'on ' , '1 ' ));
37- $ this ->addOption ('false_values ' , array ('false ' , 'f ' , 'no ' , 'n ' , 'off ' , '0 ' ));
36+ $ this ->addOption ('true_values ' , array ('true ' , 't ' , 'yes ' , 'y ' , 'on ' , '1 ' , 1 , true ));
37+ $ this ->addOption ('false_values ' , array ('false ' , 'f ' , 'no ' , 'n ' , 'off ' , '0 ' , 0 , false ));
3838
3939 $ this ->setOption ('required ' , false );
4040 $ this ->setOption ('empty_value ' , false );
@@ -45,12 +45,12 @@ protected function configure($options = array(), $messages = array())
4545 */
4646 protected function doClean ($ value )
4747 {
48- if (in_array ($ value , $ this ->getOption ('true_values ' )))
48+ if (in_array ($ value , $ this ->getOption ('true_values ' ), true ))
4949 {
5050 return true ;
5151 }
5252
53- if (in_array ($ value , $ this ->getOption ('false_values ' )))
53+ if (in_array ($ value , $ this ->getOption ('false_values ' ), true ))
5454 {
5555 return false ;
5656 }
0 commit comments