[wp-trac] [WordPress Trac] #64950: wp_using_ext_object_cache can return null, causing type failures, potential fatals
WordPress Trac
noreply at wordpress.org
Tue Apr 21 02:15:51 UTC 2026
#64950: wp_using_ext_object_cache can return null, causing type failures, potential
fatals
-------------------------------------------------+-------------------------
Reporter: ronalfy | Owner:
| westonruter
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 7.1
Component: Cache API | Version: 3.7
Severity: normal | Resolution:
Keywords: has-patch has-test-info has-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Comment (by liaison):
Maintaining bool|null is significant for backwards compatibility. It
respects the 'de facto' behavior of WordPress over the years.
This proposed patch aims to align the implementation with the long-
standing documentation, providing type safety for modern PHP 8.x
environments. An unexpected null can lead to TypeError.
The added test case is designed to complete the patch's intent.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64950#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list