This simply applies this pull request:
https://github.com/ezyang/htmlpurifier/pull/224
straight to our library. Once there is some new htmlpurifier
release available (>v4.11.0) we'll be back upstream because
the fix will be included.
We are using a really outdated Typo3 library (2014) already patched
for php73 support. Plus, probably, we'll be soon removing it from core.
So we have decided to, instead of upgrade, apply the needed php74 fixes.
Note this is different from the upstream commit:
a35858f040
because it was conflicting so only the cases corresponding
to our current 1.8.0 version have been modified.
This commit is trivial, just a pure curly to square replacement.
The discussion creation time (or first post) is being shown
both in the "started by" and "last post" columns in forum
discussions list.
Just let's change the former to show the discussion modification
time (or last post) instead.
In PHP the following are true:
assert('' == '');
assert(0 == '');
assert(null == '');
The options in the course completion settings are now:
'' => none selected
[int] => itemnumber of activity course completion item.
In the case where the itemnumber was 0 this was being incorrectly
evaluated as an empty string due to the implicit cast to int of the
empty string:
(int) '' === 0
As a result, the non-strict comparison means that the following are
identical:
assert(0 == '');
assert(0 == (int) '');
assert(0 == '0');
Changing the comparison to a strict comparison is correct because it
ensures the type consitency between the empty string value, and the int
of itemnumber 0. It is safe because the value always comes from the
form, where an int is always returned, and not the DB, where a string is
returned.
It is still used widely in the plugins that would stop working suddenly
without being warned via a debugging message. We must keep it forever as
an alias for the wwwroot.
The default value is an empty string (""), which in PHP evaluates to 0 when
cast to a string in our DML layer.
The fix is to forcibly make it null which is not cast to string in DML
for optional strings.