[wp-trac] [WordPress Trac] #57579: Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in admin-header.php

WordPress Trac noreply at wordpress.org
Mon Jan 30 17:21:44 UTC 2023


#57579: Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type
string is deprecated in admin-header.php
--------------------------+---------------------
 Reporter:  ipajen        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.2
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  PHP81         |     Focuses:
--------------------------+---------------------

Comment (by jrf):

 Thanks @ipajen for reporting this!

 I concur with @peterwilsoncc that option 1 is the preferred path forward,
 though also want to mention this sounds like this is primarily an issue
 with a plugin ''doing_it_wrong'' and that the plugin should be fixed (as
 well).

 I can see one more alternative option, which could (should) possible be
 applied in conjunction with the solution suggested by @peterwilsoncc: for
 `wp-admin/admin-header.php` to do an early check for the global variables
 it requires to be set and to set those to a default value (for example, an
 empty string for `$title) if the variable is not available.

 What do you think @peterwilsoncc ?

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


More information about the wp-trac mailing list