Opened 2 months ago
Closed 2 months ago
#61841 closed defect (bug) (duplicate)
Deprecation Warning
Reported by: | behzadr89 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.6.1 |
Component: | General | Keywords: | php81 has-patch |
Focuses: | administration, php-compatibility | Cc: |
Description
When accessing the WordPress admin page, a deprecation warning is displayed in the error logs:
Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in /home3/atiwpcom/public_html/wp-admin/admin-header.php on line 36
This issue arises because the strip_tags() function is being passed a null value. As of PHP 8.1, passing null to strip_tags() is deprecated and will trigger a warning. The code should ensure that a non-null value is passed to strip_tags() to prevent this warning.
Change History (2)
This ticket was mentioned in PR #7156 on WordPress/wordpress-develop by @narenin.
2 months ago
#1
- Keywords has-patch added
#2
@
2 months ago
- Keywords php81 added; admin deprecation php8 strip_tags warning error compatibility removed
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Hi there, welcome to WordPress Trac!
Thanks for the report, we're already tracking this issue in #57579.
Trac ticket: https://core.trac.wordpress.org/ticket/61841