@@ -568,7 +568,7 @@ public static function checkBoxList($name, $select, $data, $htmlOptions = [])
568
568
$ checkAll = true ;
569
569
570
570
foreach ($ data as $ value => $ label ) {
571
- $ checked = !is_array ($ select ) && !strcmp ($ value , $ select ) || is_array ($ select ) && in_array ($ value , $ select );
571
+ $ checked = ( !is_array ($ select ) && !strcmp ($ value , $ select )) || ( is_array ($ select ) && in_array ($ value , $ select) );
572
572
$ checkAll = $ checkAll && $ checked ;
573
573
$ htmlOptions ['value ' ] = $ value ;
574
574
$ htmlOptions ['id ' ] = $ baseID . '_ ' . $ id ++;
@@ -775,7 +775,7 @@ public static function listOptions($selection, $listData, &$htmlOptions)
775
775
// For single-level arrays where additional options available
776
776
$ attributes = ['value ' => (string )$ key , 'encode ' => ! $ raw ];
777
777
if (!empty ($ value ['optionDisabled ' ])) $ attributes ['disabled ' ] = true ;
778
- if (!is_array ($ selection ) && !strcmp ($ key , $ selection ) || is_array ($ selection ) && in_array ($ key , $ selection )) {
778
+ if (( !is_array ($ selection ) && !strcmp ($ key , $ selection )) || ( is_array ($ selection ) && in_array ($ key , $ selection) )) {
779
779
$ attributes ['selected ' ] = 'selected ' ;
780
780
}
781
781
if (isset ($ options [$ key ])) $ attributes = array_merge ($ attributes , $ options [$ key ]);
@@ -790,7 +790,7 @@ public static function listOptions($selection, $listData, &$htmlOptions)
790
790
}
791
791
} else {
792
792
$ attributes = ['value ' => (string )$ key , 'encode ' => ! $ raw ];
793
- if (!is_array ($ selection ) && !strcmp ($ key , $ selection ) || is_array ($ selection ) && in_array ($ key , $ selection )) {
793
+ if (( !is_array ($ selection ) && !strcmp ($ key , $ selection )) || ( is_array ($ selection ) && in_array ($ key , $ selection) )) {
794
794
$ attributes ['selected ' ] = 'selected ' ;
795
795
}
796
796
if (isset ($ options [$ key ])) $ attributes = array_merge ($ attributes , $ options [$ key ]);
0 commit comments