File tree 3 files changed +1
-14
lines changed
3 files changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ Yii Framework 2 Change Log
8
8
- Bug #16116 : Codeception: oci does not support enabling/disabling integrity check (@terabytesoftw )
9
9
- Bug #20191 : Fix ` ActiveRecord::getDirtyAttributes() ` for JSON columns with multi-dimensional array values (brandonkelly)
10
10
- Bug #20175 : Fix bad result for pagination when used with GridView (@lav45 )
11
- - Enh #20198 : Boolean values of the ` value ` HTML attribute are now converted to integer values (@s1lver )
12
11
13
12
14
13
2.0.50 May 30, 2024
Original file line number Diff line number Diff line change @@ -2003,10 +2003,8 @@ public static function renderTagAttributes($attributes)
2003
2003
$ html = '' ;
2004
2004
foreach ($ attributes as $ name => $ value ) {
2005
2005
if (is_bool ($ value )) {
2006
- if ($ value && ' value ' !== $ name ) {
2006
+ if ($ value ) {
2007
2007
$ html .= " $ name " ;
2008
- } elseif ('value ' === $ name ) {
2009
- $ html .= " $ name= \"" . static ::encode ((int )$ value ) . '" ' ;
2010
2008
}
2011
2009
} elseif (is_array ($ value )) {
2012
2010
if (in_array ($ name , static ::$ dataAttributes )) {
Original file line number Diff line number Diff line change @@ -1231,16 +1231,6 @@ public function testRenderTagAttributes()
1231
1231
$ this ->assertEquals ('' , Html::renderTagAttributes (['class ' => []]));
1232
1232
$ this ->assertEquals (' style="width: 100px; height: 200px;" ' , Html::renderTagAttributes (['style ' => ['width ' => '100px ' , 'height ' => '200px ' ]]));
1233
1233
$ this ->assertEquals ('' , Html::renderTagAttributes (['style ' => []]));
1234
- $ this ->assertEquals (' type="submit" value="1" ' , Html::renderTagAttributes (['type ' => 'submit ' , 'value ' => true ]));
1235
- $ this ->assertEquals (' type="submit" value="0" ' , Html::renderTagAttributes (['type ' => 'submit ' , 'value ' => false ]));
1236
- $ this ->assertEquals (
1237
- ' type="submit" value="1" disabled ' ,
1238
- Html::renderTagAttributes (['type ' => 'submit ' , 'value ' => true , 'disabled ' => true ])
1239
- );
1240
- $ this ->assertEquals (
1241
- ' type="submit" value="0" ' ,
1242
- Html::renderTagAttributes (['type ' => 'submit ' , 'value ' => false , 'disabled ' => false ])
1243
- );
1244
1234
1245
1235
$ attributes = [
1246
1236
'data ' => [
You can’t perform that action at this time.
0 commit comments