MetaBox not saving after empty

Here’s an updated version of save_TFP_meta(), which has modified saving logic. It fixes the issue where the meta data was not being saved after being emptied.

function save_TFP_meta( $post_id, $post ) {

    if ( ! wp_verify_nonce( $_POST['TFP_meta_box_nonce'], plugin_basename( __FILE__ ) ) )
            return $post_id;

    if ( ! current_user_can( 'edit_post', $post_id ) )
            return $post_id;

    $TFP_meta_value = get_post_meta( $post_id, 'TFP', true );
    $new_TFP_meta_value = stripslashes( $_POST['TFP'] );

    if ( false !== $TFP_meta_value && '' == $new_TFP_meta_value ) {
        delete_post_meta( $post_id, 'TFP', $TFP_meta_value );
    } else {
        update_post_meta( $post_id, 'TFP', $new_TFP_meta_value );
    }
}

error code: 523