[wp-trac] [WordPress Trac] #52217: Fix code issues identified by PHPStan
WordPress Trac
noreply at wordpress.org
Tue Apr 8 18:02:31 UTC 2025
#52217: Fix code issues identified by PHPStan
-------------------------+-------------------------------
Reporter: johnbillion | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: coding-standards
-------------------------+-------------------------------
Comment (by SergeyBiryukov):
In [changeset:"60147" 60147]:
{{{
#!CommitTicketReference repository="" revision="60147"
General: Correct `force_ssl_content()` to always return a boolean value.
This aims to bring parity with `force_ssl_admin()`.
Includes:
* Allowing `force_ssl_content()` to properly accept `false` as a value.
* Correcting an erroneous `! $force` conditional that should have been
reversed.
* Adding unit tests to confirm valid behavior.
Follow-up to [https://mu.trac.wordpress.org/changeset/1979 mu:1979],
[11903], [12603], [47808], [59830].
Props justlevine for initial patch.
See #52217.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52217#comment:107>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list