[wp-trac] [WordPress Trac] #42814: PHP 7.2 Warning: ...wp-includes/post-template.php on line 284

WordPress Trac noreply at wordpress.org
Thu Nov 29 13:19:44 UTC 2018


#42814: PHP 7.2 Warning: ...wp-includes/post-template.php on line 284
-------------------------------+-----------------------
 Reporter:  internetwerk       |       Owner:  (none)
     Type:  defect (bug)       |      Status:  reopened
 Priority:  normal             |   Milestone:  5.1
Component:  Posts, Post Types  |     Version:  4.5
 Severity:  normal             |  Resolution:
 Keywords:  dev-feedback       |     Focuses:
-------------------------------+-----------------------

Comment (by spacedmonkey):

 I spent the evening looking this issue and #36934 as they related.

 Looking at this change, it seems impossible to use `get_the_content()` all
 the globals to be setup and will never work as expected in this context. I
 believe in the only way to fix this is to use post_content directly from
 the `$post`. This maybe a major breaking change, but for the fix I believe
 it is worth it.

 I have added a patch
 [https://core.trac.wordpress.org/attachment/ticket/42814/42814.2.diff
 42814.2.diff].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/42814#comment:68>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list