[PHP 8.1] deprecated null in explode() for 'ping_sites' in wp-admin/options-writing.php with "Discourage search engines" on (original) (raw)
#59818 closed defect (bug) (fixed)
| Reported by: | |
Owned by: | |
|---|---|---|---|
| Milestone: | 6.6 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | php81 has-patch has-test-info commit |
| Focuses: | php-compatibility | Cc: |
When "Discourage search engines" is on, any update to Dashboard / Writing causes:Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in .../wp-includes/formatting.php
In this case, the 'ping_sites' option is not displayed, so the $_POST value is null. The deprecation warning is triggered in wp-includes/formatting.php, in sanitize_option(), "case 'ping_sites':".
Tested on today's nightly, WordPress 6.5-alpha-57063. Also affects latest release, WP 6.3.2.