$options = get_option( 'chec_settings' ); //Error message on line bellow if ( array_key_exists( 'chec_checkbox_field_0', $options ) && $options['chec_checkbox_field_0'] == '1' ) { echo 'Checked'; } else { echo 'Unchecked'; } it the value is not checked it will not saved it db. so check if the array has `chec_checkbox_field_0` key.