[BUGFIX] Prevent strings from being autoloaded 79/27079/7
authorHelmut Hummel <helmut.hummel@typo3.org>
Mon, 27 Jan 2014 20:47:14 +0000 (21:47 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Wed, 29 Jan 2014 10:20:06 +0000 (11:20 +0100)
commitb15348a421b40553ed8b32ba19e9f8bbc84f9e0d
tree43a773daa617df4bc5ce03b3c7c9b295dbbd3eb9
parent6cd6d3b31232c7c6a8abf884746a96956aca363e
[BUGFIX] Prevent strings from being autoloaded

The introduction of a TypeConverter for Enumaration
types in #52762 added is_subclass() calls to
getPlainValue() in the DatabaseBackends. These methods
are meant to convert objects to simply types but are
regularly called with simple types, in particular strings.

Since is_subclass() also works with strings,
The class loader is triggered when these methods
are called with a table name like "tx_ext_domain_model_foo".

This triggers an issue #55418 in the class loader especially
on case insensitive filesystems.

Instead of is_subclass we now use instanceof to make sure
we only check for conversion if the value is an object.

Additionally this change fixes a wrong case statement which
also was introduced in #52762

Resolves: #54275
Change-Id: If1b2a28a2623e49dfb47720641935c6f24447c19
Reviewed-on: https://review.typo3.org/27079
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php