Review main Merged

63175[BUGFIX] Fix check for "ifEmpty" relevance

Francois Suter CR +2 V +2 Easy +2 −2 updated 02/28/20, 05:35

Commit message

The ContentObjectRenderer checks whether it is relevant or not to apply
the ifEmpty property before actually applying it. However the check does
not use the same condition as ifEmpty itself (PHP empty() vs trim()).
This patch ensures consistency while respecting the idea of the original
fix (avoid a useless processing).

NOTE: I have inverted the two conditions in the "if" statement following
a recommendation by the Php Inspections plugin of PhpStorm which said
that the condition about "ifBlank" was faster and should be executed
first.

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 1

Files 1