[BUGFIX] ClassLoader exits early for invalid class names 53/28553/5
authorHelmut Hummel <helmut.hummel@typo3.org>
Thu, 20 Mar 2014 08:36:14 +0000 (09:36 +0100)
committerErnesto Baschny <ernst@cron-it.de>
Mon, 24 Mar 2014 13:04:52 +0000 (14:04 +0100)
commit0e20f584f547b3b71595f871f7ecd52659c3c106
tree74d8e2d32e2841f176e5e46c0c114a9a5ab4a9bc
parent0681f84fc9ccc89a300e63c8b066012d9d1e9138
[BUGFIX] ClassLoader exits early for invalid class names

Instead of doing calculations if an invalid
class name could still be found and implementing
safeguards that our caching layer does not
fail with invalid identifiers, we exit early
if we find an invalid class name.

Maybe PHP will be smart enough at some point
not calling an autoloader at all if the class name
is invalid anyway so we could the remove this check.

By doing a comprehensive check upfront, we can
remove the safeguard code for the caching layer.

The performance impact of this change breaks down
to be lower than 1ms for a regular TYPO3 request.

Resolves: #57183
Releases: 6.2
Change-Id: Id38bea6b85fbfd280417adca325411410cd9fb63
Reviewed-on: https://review.typo3.org/28553
Reviewed-by: Thomas Maroschik
Reviewed-by: Sebastian Fischer
Reviewed-by: Alexander Stehlik
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
typo3/sysext/core/Classes/Core/ClassLoader.php