Review main Merged

63066[BUGFIX] Avoid PHP warning in ArrayUtility::getValueByPath()

Daniel Siepmann CR +2 V +2 Easy +10 −1 updated 01/29/20, 15:47

Commit message

Children of $array in ArrayUtility::getValueByPath() may contain other
datatypes than array, therefore check the datatype by is_array()
before calling array_key_exists() in order to avoid a PHP warning.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Oliver Klee +1
    • Stephan Großberndt +1
    • Markus Klein +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Markus Klein +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 1114

  1. Daniel Siepmann uploaded patch set 1 01/29/20, 12:02

  2. Claus Due commented on patch set 1 CR -1 01/29/20, 12:14

    ArrayUtility.php:195

    $array is already constrained with type in method signature; $value = $array means $value will always be an array.
  3. Claus Due commented on patch set 1 CR +1 01/29/20, 12:15

    ArrayUtility.php:195 Reply

    Ah, nevermind... $value gets overwritten constantly in loop.
  4. Daniel Siepmann commented on patch set 1 01/29/20, 12:15

    ArrayUtility.php:195 Reply Unresolved

    This loop is recursive. The `$value` is re assigned in line 197. With added test, you can see that the type can be whatever PHP knows.
  5. TYPO3com voted on patch set 1 V +1 01/29/20, 12:23 Completed build in 19m 48s on Wed, 29 Jan, 12:23 PM Test Summary: 70840 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40315

  6. Oliver Klee voted on patch set 1 CR +1 01/29/20, 12:57

  7. Stephan Großberndt updated the commit message in patch set 2 01/29/20, 13:53

  8. Stephan Großberndt voted on patch set 2 CR +1 01/29/20, 13:53

  9. TYPO3com voted on patch set 2 V -1 01/29/20, 14:05 Completed build in 12m 14s on Wed, 29 Jan, 02:05 PM Test Summary: 60765 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40321

  10. Oliver Klee voted on patch set 2 CR +1 01/29/20, 14:06

  11. TYPO3com voted on patch set 2 V +1 01/29/20, 14:24 Completed build in 14m 15s on Wed, 29 Jan, 02:24 PM Test Summary: 70840 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40323

  12. Markus Klein voted on patch set 2 V +1 CR +1 01/29/20, 15:14

  13. Benjamin Franzke voted on patch set 2 V +2 CR +2 01/29/20, 15:47

  14. Benjamin Franzke merged patch set 3 01/29/20, 15:47