File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1726,7 +1726,7 @@ public function get_upload_options( $attachment_id ) {
17261726 */
17271727 public function maybe_overwrite_featured_image ( $ attachment_id ) {
17281728 $ overwrite = false ;
1729- if ( $ this ->doing_featured_image && $ this ->doing_featured_image === $ attachment_id ) {
1729+ if ( $ this ->doing_featured_image && $ this ->doing_featured_image === ( int ) $ attachment_id ) {
17301730 $ overwrite = (bool ) $ this ->get_post_meta ( get_the_ID (), Global_Transformations::META_FEATURED_IMAGE_KEY , true );
17311731 }
17321732
@@ -1740,7 +1740,7 @@ public function maybe_overwrite_featured_image( $attachment_id ) {
17401740 * @param int $attachment_id The thumbnail ID.
17411741 */
17421742 public function set_doing_featured ( $ post_id , $ attachment_id ) {
1743- $ this ->doing_featured_image = $ attachment_id ;
1743+ $ this ->doing_featured_image = ( int ) $ attachment_id ;
17441744 add_action ( 'end_fetch_post_thumbnail_html ' , function () {
17451745 $ this ->doing_featured_image = false ;
17461746 } );
You can’t perform that action at this time.
0 commit comments