WordPress error: Missing argument 2 for wp_kses

When you get this error:

Missing argument 2 for wp_kses

How to fix error missing argument 2 for wp_kses

Change this line

update_post_meta( $post_id, 'post_meta', wp_kses( $_POST['post_meta']) );

to this line:

update_post_meta( $post_id, 'post_meta', wp_kses_post( $_POST['post_meta']) );