[wp-trac] [WordPress Trac] #52217: Fix code issues identified by PHPStan
WordPress Trac
noreply at wordpress.org
Thu Nov 28 22:50:36 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:"59471" 59471]:
{{{
#!CommitTicketReference repository="" revision="59471"
Coding Standards: Cast `gmdate( 'w' )` to `int` before using as integer.
This addresses several instances of `gmdate( 'w' )` being used directly as
an integer, when it's actually a numeric string. The issue is remediated
by casting the value to `int` before use.
Affected functions:
* `get_calendar()`
* `get_weekstartend()`
Follow-up to [508], [1632].
Props justlevine.
See #52217.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52217#comment:92>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list