Opened 13 months ago
Last modified 3 months ago
#60023 new defect (bug)
Fixed force_ssl_admin to always return bool
Reported by: | pbearne | Owned by: | |
---|---|---|---|
Milestone: | 6.8 | Priority: | low |
Severity: | minor | Version: | |
Component: | General | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
this function can be passed a random string
where the Gobal value set by is used we check if it is not empty
the doc say to set a bool but is allows you set any value eg 'false' which on empty
So I have added a cast to make sure the value set is bool
see pre fix tests
https://core.trac.wordpress.org/ticket/60018
Change History (9)
This ticket was mentioned in PR #5731 on WordPress/wordpress-develop by @pbearne.
13 months ago
#1
- Keywords has-patch has-unit-tests added
This ticket was mentioned in PR #7624 on WordPress/wordpress-develop by @debarghyabanerjee.
3 months ago
#3
- Keywords has-patch added; needs-patch removed
@debarghyabanerjee commented on PR #7624:
3 months ago
#4
Hi @swissspidy , can you please take a look into this PR. Thanks
@debarghyabanerjee commented on PR #7624:
3 months ago
#5
Hi @swissspidy , can you please take a look into this PR. Thanks
#7
@
3 months ago
- Component changed from Build/Test Tools to General
- Keywords has-unit-tests added
- Milestone changed from Awaiting Review to 6.8
- Priority changed from normal to low
- Severity changed from normal to minor
Additional props to pbearne
, costdev
, autotutorial
from #57262.
@debarghyabanerjee commented on PR #7624:
3 months ago
#9
Hi @swissspidy , I have left a query, can you please check once. Thanks.
Trac Ticket: Core-60023
## Description
## Changes Made
force_ssl_admin
function to cast the$force
parameter to a boolean type. This guarantees that any input, whether it's a string, integer, or null, is converted to a boolean value (true or false).$force
parameter can acceptstring
|bool
|null
, making it clear to developers what types are acceptable.## Reasoning
## Impact
## Testing