[BUGFIX] Avoid overwriting page context in TSFE->cObj by f:cObject 61/58661/11
authorThorben Nissen <thorben.nissen@kapp-hamburg.de>
Fri, 19 Oct 2018 09:03:58 +0000 (11:03 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Fri, 7 Dec 2018 22:12:30 +0000 (23:12 +0100)
commitaad4efd3fee260c61af4814d6c08cd4932a334e4
treec478725d7642056f52678c88e1950675fb9bd0cf
parentc17978d05ae7a5c85dd46fd897903444b618423d
[BUGFIX] Avoid overwriting page context in TSFE->cObj by f:cObject

Change `CObjectViewHelper::getContentObjectRenderer` to return a new
instance of `ContentObjectRenderer` instead of returning a reference to
`TSFE->cObj`.

Change unit test and add prepared instance of `ContentObjectRenderer`
to `GeneralUtility` via `addInstance` method.

Resolves: #86979
Releases: master
Change-Id: Ibdb8fd1d974a525f3583929a743447a8650ca1ab
Reviewed-on: https://review.typo3.org/58661
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CObjectViewHelperTest.php