diff --git a/includes/admin/api/class-bc-admin-media-api.php b/includes/admin/api/class-bc-admin-media-api.php index db2b7886..ad42d229 100644 --- a/includes/admin/api/class-bc-admin-media-api.php +++ b/includes/admin/api/class-bc-admin-media-api.php @@ -249,8 +249,9 @@ public function bc_ajax_update_video_or_playlist() { } elseif ( 'videos' === $_POST['type'] ) { $type_msg = 'video'; - if ( 'variant' === $_POST['sub_type'] ) { - $status = $this->videos->update_bc_video( $updated_data, sanitize_text_field( $_POST['sub_type'] ) ); + $sub_type = $_POST['sub_type'] ?? ''; + if ( 'variant' === $sub_type ) { + $status = $this->videos->update_bc_video( $updated_data, sanitize_text_field( $sub_type ) ); } else { $status = $this->videos->update_bc_video( $updated_data );