[BUGFIX] Avoid makeInstance calls starting with a backslash 36/35836/2
authorBenjamin Mack <benni@typo3.org>
Tue, 6 Jan 2015 16:12:34 +0000 (17:12 +0100)
committerBenjamin Mack <benni@typo3.org>
Tue, 6 Jan 2015 18:33:29 +0000 (19:33 +0100)
commit605c50b61500d5f107888475cf4adb1d58eee0c9
tree6b14cafb11738912d839fb9feb27a7b1430b5fdd
parent76fe2491f76c45c93229ccfc6c88a571ed2c0bc2
[BUGFIX] Avoid makeInstance calls starting with a backslash

When using singletons and calling makeInstance
with a beginning backslash in the class name
(see forge example), the singleton is not
correctly used.

Like inside the class loader, makeInstance and
the Extbase object manager should check for
a beginning backslash in the string of the
class name, and throw an exception, to give developers
a hint about broken code.

Change-Id: Ie7e0a6436fa8c5d983cd7e61b6ba96184440c657
Resolves: #60174
Releases: 6.2
Reviewed-on: http://review.typo3.org/35836
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/extbase/Classes/Object/Container/Container.php