Review main Merged

70689[TASK] Fix possible null pointer exception

Oli Bartsch CR +2 V +2 Easy +9 −3 updated 08/23/21, 14:52

Commit message

AbstractTreeView defines the current "scriptUrl",
to build links in the backend. Since this class
may also be called via CLI, e.g. by EXT:impexp,
missing `instanceof` checks are added to prevent
a null pointer exception.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Alexander Nitsche +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Alexander Nitsche +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 1013

  1. Oli Bartsch uploaded patch set 1 08/20/21, 17:06

  2. Oliver Klee voted on patch set 1 CR +1 08/20/21, 17:08

  3. core-ci voted on patch set 1 V +1 08/20/21, 17:18 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15338

  4. Alexander Nitsche commented on patch set 1 V +1 CR -1 08/20/21, 17:54

    (1) The commit message has a "Dreher" in the commit message headline. (2) The script url process in \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::buildBackendUri or in \TYPO3\CMS\Backend\Utility\BackendUtility::buildScriptUrl additionally test for ``` ($route = $GLOBALS['TYPO3_REQUEST']->getAttribute('route')) instanceof Route ``` before building the url. Is it not required here? (3) The CLI command impexp:export runs fine with this patch.
  5. Oli Bartsch uploaded patch set 2 08/20/21, 19:45

  6. Oli Bartsch commented on patch set 2 08/20/21, 19:46

    Reply

    Done
  7. core-ci voted on patch set 2 V -1 08/20/21, 20:04 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15349

  8. Oli Bartsch uploaded patch set 3 08/20/21, 20:06

  9. core-ci voted on patch set 3 V +1 08/20/21, 20:33 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15352

  10. Alexander Nitsche commented on patch set 3 V +1 CR +1 08/21/21, 08:05

    Tested by - running CLI command of https://review.typo3.org/c/Packages/TYPO3.CMS/+/70393 - running acceptance tests and functional tests of https://review.typo3.org/c/Packages/TYPO3.CMS/+/70393
  11. Oliver Klee voted on patch set 3 CR +1 08/23/21, 12:20

  12. Christian Kuhn voted on patch set 3 V +2 CR +2 08/23/21, 14:52

  13. Christian Kuhn merged patch set 4 08/23/21, 14:52