Changes between Initial Version and Version 15 of Ticket #57579
- Timestamp:
- 08/08/2023 07:01:53 PM (16 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #57579
- Property Focuses php-compatibility added
-
Property
Component
changed from
Plugins
toGeneral
-
Property
Summary
changed from
Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in admin-header.php
toReplace most strip_tags() with wp_strip_tags()
-
Property
Milestone
changed from
Awaiting Review
toFuture Release
- Property Keywords php81 has-patch changes-requested needs-unit-tests added; PHP81 removed
-
Ticket #57579 – Description
initial v15 1 Originally reported as an issue with `strip_tags()` in `wp-admin/admin-header.php`, this ticket's scope as grown to initiative to replace `strip_tags()` with `wp_strip_tags()`. 2 3 Proposal: 4 5 * Replace most calls to `strip_tags()` with calls to `wp_strip_all_tags()` 6 @peterwilsoncc [#comment:1 notes]: 7 >this is a slight compatibility change as it will strip the contents of `<style>` and `<script>` tags, but I don't think that's a bad thing 8 9 * Add an early check in `wp-admin/admin-header.php` to set up the global variables. 10 11 @jrf [#comment:2 notes]: 12 >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. 13 14 The original reported issue: 15 1 16 When using the plugin HD Quiz this warning is given in version 6.2-alpha-55159 with PHP 8.1. 2 17 18 {{{ 3 19 Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in /public_html/blog/wp-admin/admin-header.php on line 36 20 }}} 4 21 5 22 Link to ticket for plugin: