[wp-trac] [WordPress Trac] #57674: unregister_setting() raises a PHP warning on unknown settings
WordPress Trac
noreply at wordpress.org
Tue Oct 3 15:40:22 UTC 2023
#57674: unregister_setting() raises a PHP warning on unknown settings
-------------------------------------------------+-------------------------
Reporter: xknown | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.4
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: php81 has-patch has-unit-tests | Focuses: php-
needs-testing | compatibility
-------------------------------------------------+-------------------------
Comment (by nicolefurlan):
== Test Report
This report validates that the indicated patch addresses the issue.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/4035
=== Environment
- OS: macOS Ventura 13.4.1
- PHP: 8.2.11
- WordPress: trunk
=== Actual Results
- ✅ Issue resolved with patch.
- ✅ Unit tests pass.
=== Additional Notes
- I used WP CLI via `npm run env:cli` to test this and verified that when
executing `unregister_setting( 'somethingrandom', 'somethingrandom' );` on
the CLI, the `Notice: Trying to access array offset on value of type null
in /var/www/src/wp-includes/option.php on line 2821` notice appears
without the patch, and disappears after applying the patch.
- I ran phpunit on `registration.php` via `npm run test:php --debug
tests/phpunit/tests/option/registration.php` and verified that all unit
tests pass in `registration.php`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57674#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list