[wp-trac] [WordPress Trac] #47867: wp_trim_excerpt and wp_trim_words don't validate the excerpt length (int)

WordPress Trac noreply at wordpress.org
Wed Aug 14 17:18:01 UTC 2019


#47867: wp_trim_excerpt and wp_trim_words don't validate the excerpt length (int)
--------------------------------------+-----------------------------
 Reporter:  pikamander2               |       Owner:  SergeyBiryukov
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  5.3
Component:  Posts, Post Types         |     Version:  5.2.2
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"45796" 45796]:
 {{{
 #!CommitTicketReference repository="" revision="45796"
 Posts, Post Types: In `wp_trim_words()` make sure the `$num_words`
 parameter is always an integer, as documented, to avoid a PHP warning.

 Props donmhico, pikamander2.
 Fixes #47867.
 }}}

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


More information about the wp-trac mailing list