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

WordPress Trac noreply at wordpress.org
Sun Jun 21 10:34:50 UTC 2020


#42814: PHP 7.2 Warning: ...wp-includes/post-template.php on line 284
-------------------------------------------------+-------------------------
 Reporter:  internetwerk                         |       Owner:
                                                 |  boonebgorges
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.2
Component:  Posts, Post Types                    |     Version:  4.5
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  dev-feedback has-patch 2nd-opinion   |     Focuses:
  php73 has-unit-tests                           |
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 In [changeset:"48114" 48114]:
 {{{
 #!CommitTicketReference repository="" revision="48114"
 Posts, Post Types: Avoid a PHP warning when `get_the_content()` is called
 outside of the loop.

 This ensures that `$pages` and other globals are only used after they have
 been set up in `setup_postdata()`.

 Follow-up to [44941].

 Props tessawatkinsllc, dontdream, spacedmonkey, squarecandy,
 davidbaumwald, SergeyBiryukov.
 Fixes #47824. See #42814.
 }}}

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


More information about the wp-trac mailing list