The check `if ( $config['disabled'] == true )` is the same as the
check `if ( $config['disabled'] )`. Was this intentional or was it
supposed to be a test for equality and type (===)? If not, then I
think this patch removes the irrelevancy.
Clearly, if the $config['disabled'] is set to false, the isset()
check will return true but the second check will fail even with
this patch as it does the same thing.
Change-Id: Ibbe5b4949590f8ac954f613236056dd2e6dd18ba
* - array $config['textinput'] Configuration for the TextInputWidget
* - array $config['dropdowninput'] Configuration for the DropdownInputWidget
* - bool $config['or'] Configuration for whether the widget is dropdown AND input
- * or dropdown OR input
+ * or dropdown OR input
*/
public function __construct( array $config = [] ) {
// Configuration initialization
$config
);
- if ( isset( $config['disabled'] ) && $config['disabled'] == true ) {
+ if ( isset( $config['disabled'] ) && $config['disabled'] ) {
$config['textinput']['disabled'] = true;
$config['dropdowninput']['disabled'] = true;
}