WordPress check box unchecked on null value ternary operator [plugin development]

checked() only checks if the passed first and second parameters match. It doesn’t do any array key checking, so you need to do it yourself before using the function to avoid errors.

<?php 
  global $options;
  $enabled = ( isset( $options['enable'] ) ) ? $options['enable']: '';
?>
<input name="settings['enable']" type="checkbox" id="" value="1" <?php checked( $enabled, 1 ); ?>>