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 Done
    • Andreas Kienast +2
    • Oliver Klee +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 810

  1. Stefan Bürk uploaded patch set 1 10/30/21, 18:21

  2. Oliver Klee voted on patch set 1 CR +1 10/30/21, 18:31

  3. core-ci voted on patch set 1 V +1 10/30/21, 18:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18681

  4. Andreas Kienast updated the commit message in patch set 2 11/01/21, 10:44

  5. Andreas Kienast voted on patch set 2 CR +1 11/01/21, 10:44

  6. Oliver Klee voted on patch set 2 CR +1 11/01/21, 10:52

  7. core-ci voted on patch set 2 V +1 11/01/21, 11:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18717

  8. Nikita Hovratov voted on patch set 2 V +1 CR +1 11/01/21, 14:20

  9. Andreas Kienast voted on patch set 2 V +2 CR +2 11/02/21, 13:05

  10. Andreas Kienast merged patch set 3 11/02/21, 13:05