Skip to content

IBX-12202: Fixed error on Date field with missing timestamp key - #797

Open
mateuszdebinski wants to merge 3 commits into
5.0from
IBX-12202-Fixed-error-on-Date-field-with-missing-timestamp-key
Open

IBX-12202: Fixed error on Date field with missing timestamp key#797
mateuszdebinski wants to merge 3 commits into
5.0from
IBX-12202-Fixed-error-on-Date-field-with-missing-timestamp-key

Conversation

@mateuszdebinski

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12202

Description:

DateConverter::toStorageValue() assumed $value->data always contains a 'timestamp' key. When only 'timestring' was set (e.g. default value built from a field definition with DEFAULT_CURRENT_DATE), this caused an undefined array key error. The value is now derived from 'timestring' when 'timestamp' is missing, and null is used as a fallback.

I wasn't sure if we should leave null here like in this PR #757.

For QA:

Documentation:

@mateuszdebinski
mateuszdebinski requested a review from a team August 5, 2026 11:45
@mateuszdebinski mateuszdebinski self-assigned this Aug 5, 2026
@mateuszdebinski mateuszdebinski added Bug Something isn't working Ready for review labels Aug 5, 2026
Comment thread phpstan-baseline.neon Outdated
Comment thread tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php Outdated
Comment thread src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php Outdated
Comment thread phpstan-baseline.neon Outdated
Comment thread src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php Outdated
Comment thread phpstan-baseline.neon Outdated
Comment thread src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php Outdated
Comment thread src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php Outdated
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

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

Labels

Bug Something isn't working Ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants