Repository navigation
Datumsfelder: NULL/leere Werte in der Listenansicht nicht an DateTime::createFromFormat() geben - #1598
Open
tbaddade wants to merge 1 commit into
Open
Datumsfelder: NULL/leere Werte in der Listenansicht nicht an DateTime::createFromFormat() geben#1598tbaddade wants to merge 1 commit into
tbaddade wants to merge 1 commit into
Conversation
…eben rex_yform_value_date und rex_yform_value_datetime riefen createFromFormat() auch mit NULL auf (nullable Spalte ohne Wert), was seit PHP 8.1 eine Deprecation ausloest und die Datensatz-Liste im Debug-Modus abbrechen laesst. Leere/NULL-Werte werden nun vorab als leer gerendert.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Beim Öffnen der Datensatz-Liste einer YForm-Tabelle mit einem
date- oderdatetime-Feld, dessen (nullable) Spalte keinen Wert hat, bricht die Liste im Debug-Modus ab:rex_yform_value_date::date_getFormattedDate()bzw.rex_yform_value_datetime::datetime_getFormattedDatetime()rufenDateTime::createFromFormat()auf, bevor sie den Wert auf leer/NULLprüfen. Bei nullable Spalten (z. B. optionale Termin- oder Workflow-Daten, die erst später gesetzt werden) ist der WertNULL→ Deprecation seit PHP 8.1, und im Debug-Modus wird daraus ein Abbruch der Listenansicht.Fix
Früh-Return für leere/
NULL-Werte, bevorcreateFromFormat()aufgerufen wird — die Zelle wird dann leer gerendert (statt[]). Gültige Daten und die[…]-Markierung für echte Fehlwerte verhalten sich unverändert.Verifikation
getListValue()über beide Feldtypen mitnull/''/ gültigem Wert / Müll:null[]''[]2026-06-0505.06.202605.06.2026garbage[garbage][garbage](analog für
datetime)Hinweis: Versionsnummer und Datum im CHANGELOG (
5.0.3/17.07.2026) sind provisorisch — bitte beim Release anpassen.