[BUGFIX] Ensure cObj only contains valid property objects 44/57944/2
authorBenni Mack <benni@typo3.org>
Fri, 17 Aug 2018 09:49:01 +0000 (11:49 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 17 Aug 2018 10:32:54 +0000 (12:32 +0200)
commita635201582e64c70578c9ca1e218a214078c0eed
tree81b44b0a98a0f0ef7740e85dd0beda63d9d24027
parent6a73883dccf40a0e080319c7bf852576b539c04a
[BUGFIX] Ensure cObj only contains valid property objects

If a cObj instance is serialized (which happens very often), all sub-objects are
serialized with it.

This has a bad side-effect with Logging (as we've seen in other places like scheduler tasks)
when a logger with a FileWriter (to a resource pointer) is used, as the __wakeup() basically
destroys everything.

Therefore the logger is instantiated separately in __wakeup() - the same behaviour
as done with TSFE in ContentObjectRenderer.

Additionally, in order to improve memory footprint, the MarkerBasedTemplateService
is only instantiated whenever used (and not serialized).

Resolves: #85886
Releases: master
Change-Id: I3347485c2a6dcb6cf86a4f8182df6aa004582bb5
Reviewed-on: https://review.typo3.org/57944
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stephan GroƟberndt <stephan.grossberndt@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php