[wp-trac] [WordPress Trac] #64283: PHP Deprecated: strip_tags(): Passing null to parameter #1 ($string) admin-header.php on line 41

WordPress Trac noreply at wordpress.org
Thu Nov 20 23:31:56 UTC 2025


#64283: PHP Deprecated:  strip_tags(): Passing null to parameter #1 ($string)
admin-header.php on line 41
--------------------------+------------------------------------------------
 Reporter:  dglingren     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:                |     Version:
  Administration          |
 Severity:  minor         |  Resolution:  duplicate
 Keywords:                |     Focuses:  administration, php-compatibility
--------------------------+------------------------------------------------
Changes (by sabernhardt):

 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  Awaiting Review =>


Comment:

 A `null` value for `$title` should indicate that a plugin is doing
 something wrong because `get_admin_page_title()` requires a string.

 However, #57579 proposed to change `strip_tags()` to
 `wp_strip_all_tags()`, which would convert `null` to an empty string and
 silence the error message.

 ----

 If you have a plugin that uses either `null` or an empty string as the
 first parameter of `add_submenu_page()`, I think that parameter should
 have been `'options.php'` instead (though
 [https://wordpress.org/support/topic/depricated-errors/ plugin authors
 would need to confirm whether it works correctly]).

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


More information about the wp-trac mailing list