Opened 2 years ago
Last modified 2 years ago
#57266 new defect (bug)
wp_suspend_cache_invalidation can be set to no Boolean value which break usage
Reported by: | pbearne | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
Change History (3)
This ticket was mentioned in PR #3722 on WordPress/wordpress-develop by @pbearne.
2 years ago
#1
- Keywords has-patch has-unit-tests added
#2
@
2 years ago
Nicely spotted @pbearne!
Looks like we can do something along these lines:
<?php if ( ! is_bool( $suspend ) ) { _doing_it_wrong( __FUNCTION__, sprintf( /* translators: %s: The "$suspend" variable name. */ __( '"%s" must be of type "bool".' ), ), '6.2.0' ); $suspend = (bool) $suspend; }
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/57266