Review main Abandoned

80322[BUGFIX]: Add condition to check for json_decode() return value

Max Frerichs CR 0 V 0 Easy +1 −1 updated 08/08/23, 11:31

Commit message

In some (I think rare) cases it could happen, that json_decode() returns null and foreach() throws a PHP warning, causing TYPO3 to throw an exception.
To fix this, I've added a simple condition to check for the return value of json_decode() and - if that happens - assign just an empty array to $trustedProperties.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 56

  1. Max Frerichs uploaded patch set 1 08/03/23, 20:02

  2. core-ci voted on patch set 1 V +1 08/03/23, 20:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44961

  3. Thomas Geyer voted on patch set 1 V +1 CR +1 08/03/23, 20:58

  4. Christian Kuhn commented on patch set 1 08/05/23, 20:53

    Hey. First - thanks for the patch! Unfortunately, the issue is a duplicate of https://forge.typo3.org/issues/97337 which already has a pending patch with some discussion and works. To reduce confusion, we'll have to abandon here. Please continue at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78002
  5. Christian Kuhn abandoned the change 08/05/23, 20:54

  6. Max Frerichs commented on patch set 1 08/08/23, 11:31

    Reply

    Thanks for the kind feedback!