Skip to content

Commit

Permalink
VideoPress: Add missing check for empty video_info on get_media_item_…
Browse files Browse the repository at this point in the history
…v1_1 (#39706)

* Add missing check for empty video_info

* changelog

* Use ! empty
  • Loading branch information
phcp authored Oct 10, 2024
1 parent c23922d commit a5ec57e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: Add missing check for empty video_info on get_media_item_v1_1


2 changes: 1 addition & 1 deletion projects/plugins/jetpack/class.json-api-endpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -1739,7 +1739,7 @@ public function get_media_item_v1_1( $media_id, $media_item = null, $file = null
}

$thumbnail_query_data = array();
if ( function_exists( 'video_is_private' ) && video_is_private( $info ) ) {
if ( ! empty( $info ) && function_exists( 'video_is_private' ) && video_is_private( $info ) ) {
$thumbnail_query_data['metadata_token'] = video_generate_auth_token( $info );
}

Expand Down

0 comments on commit a5ec57e

Please sign in to comment.