[wp-trac] [WordPress Trac] #62785: wp_kses_no_null() should be modified to handle $content having a null value
WordPress Trac
noreply at wordpress.org
Wed Dec 10 16:26:11 UTC 2025
#62785: wp_kses_no_null() should be modified to handle $content having a null value
-------------------------------------------------+-------------------------
Reporter: room34 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests php81 | Focuses: php-
needs-testing | compatibility
-------------------------------------------------+-------------------------
Comment (by sajib1223):
== Test Report
=== Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/8096
=== Environment
- WordPress: 6.9
- PHP: 8.3.28
- Server: Apache/2.4.65 (Debian)
- Database: mysqli (Server: 10.6.24-MariaDB-ubu2204 / Client: mysqlnd
8.3.28)
- Browser: Firefox 145.0
- OS: Windows 10/11
- Theme: Twenty Twenty 3.0
- MU Plugins: None activated
- Plugins:
* KSES Null Test Plugin 1.0.0
* Test Reports 1.2.1
=== Actual Results
1. ✅ Issue resolved with patch.
=== Additional Notes
- Created a custom plugin to run this function in a admin screen -
`wp_kses_post(null);`
- Before patch, it showed - ` Deprecated: preg_replace(): Passing null to
parameter #3 ($subject) of type array|string is deprecated in
/var/www/html/wp-includes/kses.php on line 2035 ` message.
- After patch, not error were shown.
=== Supplemental Artifacts
None.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62785#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list