Review main Merged

78622[BUGFIX] Prevent exception using getTSFE() in backend context

Oli Bartsch CR +2 V +2 Normal +64 −2 updated 04/14/23, 07:56

Commit message

In case the "getTSFE()" expression function is called
in backend context - having no TSFE available-, the
function returned "FALSE" since  #100237. This however
prevents to properly check such state in the expression
itself. This is now fixed by returning "NULL" instead,
as it's the case for similar functions, e.g. "site()" or
"siteLanguage()").

This allows to properly use the null-safe operator ("?").

Example usage: `[getTSFE()?.id = 123]`

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 3