Review main Merged

72009[BUGFIX] Avoid calling str_contains(null) in DataHandler

Stefan Bürk CR +2 V +2 Easy +2 −0 updated 11/02/21, 13:05

Commit message

Method convNumEntityToByteValue() has been removed through #95789,
thus the one place it was called was removed also. As this method
called in that place has ensured that "$value" was always a string,
this is not ensured anymore after its removal.

Now this ends up calling str_contains(...) with a non-string
value which throws an E_DEPRECATED warning in PHP 8.1.

This patch adds a *string* type cast to ensure "$value" is always
a string, thus avoid calling str_contains(...) with a null value.

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