[wp-trac] [WordPress Trac] #52217: Fix code issues identified by PHPStan
WordPress Trac
noreply at wordpress.org
Thu Nov 7 23:45:56 UTC 2024
#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:"59373" 59373]:
{{{
#!CommitTicketReference repository="" revision="59373"
Coding Standards: Ensure `$current` cookie time is `int` in
`wp_user_settings()`.
This addresses an issue where a string (`$current`) is compared to an
integer (`$last_saved`). The issue is resolved by casting the results of
`preg_replace()` to type `int` when `$current` is defined.
Follow-up to [8784], [10083], [25109].
Props justlevine.
See #52217.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52217#comment:67>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list