[wp-trac] [WordPress Trac] #39277: get_post_galleries() produces PHP Warning in PHP 7.1 when parsing empty shortcode

WordPress Trac noreply at wordpress.org
Fri Feb 17 06:45:34 UTC 2017


#39277: get_post_galleries() produces PHP Warning in PHP 7.1 when parsing empty
shortcode
------------------------------------------+---------------------
 Reporter:  DJPaul                        |       Owner:  dd32
     Type:  defect (bug)                  |      Status:  closed
 Priority:  normal                        |   Milestone:  4.7.3
Component:  Shortcodes                    |     Version:  4.7
 Severity:  normal                        |  Resolution:  fixed
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+---------------------
Changes (by dd32):

 * owner:   => dd32
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"40070"]:
 {{{
 #!CommitTicketReference repository="" revision="40070"
 Media: Avoid PHP Warnings in `get_post_galleries()` when processing empty
 `[gallery]` shortcodes and avoid returning the incorrect results when the
 global `$post` does not match the provided post ID.

 Props dd32, joemcgill, seanchayes.
 Fixes #39277, #39304.
 }}}

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


More information about the wp-trac mailing list