[wp-trac] [WordPress Trac] #61890: Handle WP_Term known, named dynamic properties for PHP 8.2
WordPress Trac
noreply at wordpress.org
Wed Aug 21 17:09:42 UTC 2024
#61890: Handle WP_Term known, named dynamic properties for PHP 8.2
-------------------------------------+-------------------------------------
Reporter: hellofromTonya | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Taxonomy | Version:
Severity: minor | Resolution:
Keywords: php82 has-patch has- | Focuses: coding-standards, php-
unit-tests | compatibility
-------------------------------------+-------------------------------------
Comment (by hellofromTonya):
What's the current behavior?
See it in action https://3v4l.org/6F0nJ#veol.
Current behavior with known and unknown dynamic properties:
* ✅ get, isset, set, unset of known dynamic property works.
* ✅ get, isset, set, unset of unknown dynamic property works.
* ✅ `WP_Term::$data` is initialized on get and is not included when using
`WP_Term::to_array()` or `(array) $term`.
* ✅ `WP_Term::to_array()` returns the declared properties and all dynamic
properties.
* ✅ Same results when converting object to array via
`WP_Term::to_array()` and `(array) $term`.
* No deprecation notices are thrown.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61890#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list