[wp-trac] [WordPress Trac] #39524: WP_Embed cache broken if post content is empty

WordPress Trac noreply at wordpress.org
Mon Jan 9 09:10:27 UTC 2017


#39524: WP_Embed cache broken if post content is empty
--------------------------+-----------------------------
 Reporter:  rasmusbe      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Embeds        |    Version:  4.7
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 '''Steps to reproduce:'''
 1. Create a post with empty post content and a metafield containing a
 Youtube link
 2. Run apply_filters('the_content', $meta_field_content);

 '''Expected result:'''
 Youtube-embed code

 '''Actual result:'''
 Youtube link (not embed)

 '''Possible cause:'''
 Invalid if-state on line 221 in `class-wp-embed.php`
 Should be `$this->usecache && $cached_recently`not `$this->usecache ||
 $cached_recently`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39524>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list