Review main Merged

73377[TASK] Remove superfluous function call

TYPO3com CR +2 V +2 Easy +1 −1 updated 03/07/22, 20:55

Commit message

The function call seems superfluous, the condition tests if
the array key exists, so the first parameter should be
empty, the called function cObjGet tests if the first
parameter is an array, if not, an empty string is returned.
So i think we could use the empty string directly.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1217

  1. TYPO3com uploaded patch set 1 02/09/22, 12:17

  2. core-ci voted on patch set 1 V -1 02/09/22, 12:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23280

  3. Kalle Karlson commented on patch set 2 02/09/22, 12:35

    Published edit on patch set 1.
  4. core-ci voted on patch set 2 V +1 02/09/22, 12:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23283

  5. Benni Mack commented on patch set 2 02/09/22, 13:08

    ContentObjectRenderer.php:3092

    I suggest to use stdWrapValue() here
  6. Stefan Bürk commented on patch set 2 02/23/22, 10:17

    ContentObjectRenderer.php:3092 Reply

    Looked not multiple times in the methods 'stdWrap()', 'cObjGet()' and 'stdWrapValue()' and do not came up how a replacement with the mentioned method should look like - and making sense. However, I think we should repostulate teh patch to "avoid superflous condition". Meaning remove the isset checked in that form, and call 'stdWrap(cObjGet(), ...)' combination directly. Would have the same outcome. ``` $objConf = $conf[$objName . '.'] ?? []; $value = (string)$this->stdWrap($this->cObjGet($objConf, $objName . '.'), $objConf); ``` However .. this do not fix any warning, bug or adds some feature. It's purly code-stylish. In the end I would change this with the suggested replacement above as a de-facto low-impact/code cleanup. So, using the suggestion or if you enlight me your proposal - or abandon that change at all for now ?
  7. Benni Mack commented on patch set 2 03/07/22, 18:00

    ContentObjectRenderer.php:3092 Reply

    yes. your solution seems appropriate. I was wrong.
  8. Benni Mack commented on patch set 2 03/07/22, 18:00

    ContentObjectRenderer.php:3092 Reply

    Ack
  9. Benni Mack updated the commit message in patch set 3 03/07/22, 18:01

  10. Benni Mack updated the commit message in patch set 4 03/07/22, 18:01

  11. core-ci voted on patch set 3 V +1 03/07/22, 18:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24678

  12. core-ci voted on patch set 4 V +1 03/07/22, 18:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24679

  13. Benni Mack voted on patch set 4 V +1 CR +1 03/07/22, 19:09

  14. Nikita Hovratov voted on patch set 4 V +1 CR +1 03/07/22, 19:36

  15. Stefan Bürk voted on patch set 4 V +1 CR +1 03/07/22, 20:31

  16. Benni Mack voted on patch set 4 V +2 CR +2 03/07/22, 20:55

  17. Benni Mack merged patch set 5 03/07/22, 20:55