[wp-trac] [WordPress Trac] #56434: Check that the input is a string in wp_strip_all_tags()

WordPress Trac noreply at wordpress.org
Tue Feb 7 03:32:58 UTC 2023


#56434: Check that the input is a string in wp_strip_all_tags()
-------------------------------------------------+-------------------------
 Reporter:  chocofc1                             |       Owner:
                                                 |  peterwilsoncc
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.2
Component:  Formatting                           |     Version:  2.9
 Severity:  minor                                |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests php81 2nd-  |     Focuses:
  opinion                                        |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * owner:  (none) => peterwilsoncc
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55245" 55245]:
 {{{
 #!CommitTicketReference repository="" revision="55245"
 Formatting: Guard `wp_strip_all_tags()` against fatal errors.

 Check the input of `wp_strip_all_tags()` before passing it to
 `strip_tags()`. This protects against fatal errors introduced in PHP 8,
 retaining the `E_USER_WARNING` from PHP 7, and prevents a PHP 8.1
 deprecation notice when passing null.

 Props chocofc1, costdev, jrf, dd32, audrasjb, peterwilsoncc.
 Fixes #56434.
 }}}

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


More information about the wp-trac mailing list