[wp-trac] [WordPress Trac] #58275: PHPv81 preg_split deprecation error in convert_smilies function

WordPress Trac noreply at wordpress.org
Tue May 9 13:20:57 UTC 2023


#58275: PHPv81 preg_split deprecation error in convert_smilies function
-----------------------------+------------------------------
 Reporter:  joostdekeijzer   |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Formatting       |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch php81  |     Focuses:
-----------------------------+------------------------------

Comment (by jrf):

 @joostdekeijzer Thanks for reporting this. This needs a backtrace to see
 where the error originates from.

 The `convert_smilies()` function is clearly marked as only accepting
 `string` values for `$text`.

 The current proposed patch would widen the parameter type to `?string` and
 ''hide'' the error instead of fixing it.

 This should be fixed in the location where `null` is being ''passed'' to
 `convert_smilies()` instead.

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


More information about the wp-trac mailing list