Skip to content

[FIX] Calendar: drop the self-assignments in parsePartsToDate - #12019

Open
darkdi wants to merge 1 commit into
ILIAS-eLearning:release_11from
darkdi:fix/calendar-parseparts-self-assign
Open

[FIX] Calendar: drop the self-assignments in parsePartsToDate#12019
darkdi wants to merge 1 commit into
ILIAS-eLearning:release_11from
darkdi:fix/calendar-parseparts-self-assign

Conversation

@darkdi

@darkdi darkdi commented Sep 2, 2026

Copy link
Copy Markdown

parsePartsToDate() opens by assigning $a_year, $a_month and $a_day to themselves. All three are already typed int in the signature, so the lines do nothing at all.

They read like casts that lost their (int) when the signature picked up types: the three nullable parameters below them still get $a_hour = (int) $a_hour; and friends inside the try block, which is the same idea done where it is still needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants