Issue Bug Closed

#53425Forms with German Umlauts throws Exception

Michael Staatz 11/08/13, 09:08 updated 10/02/18, 12:08

Description

When you ar using a form with an model as object that will be persited after submitting and you have, for example, a property “firstname” then it is no more possible to submit the form in the case of “Jürgen”.
You get then an exception: “Jürgen” is not a valid cache entry identifier.

In the case of “Jürgen Heinrich” all works fine.

The Problem is the new method: TypeHandlingUtility::isCoreType()

This is because it uses the PHP function: is_subclass_of

This function is known for calling the autoloader for loading this class (you can find hints of this behavior on php.net and stackoverflow.com).

A workaround could be you modify TYPO3\CMS\Extbase\Utility\TypeHandlingUtility from:

    /**
     * Returns TRUE if the $type is a CMS core type object.
     *
     * @param string $type
     * @return boolean
     */
    static public function isCoreType($type) {
        return is_subclass_of($type, 'TYPO3\\CMS\\Core\\Type\\TypeInterface');
    }

to something like:

    /**
     * Returns TRUE if the $type is a CMS core type object.
     *
     * @param string $type
     * @return boolean
     */
    static public function isCoreType($type) {
        $reflectionType = new ReflectionClass($type);
        return $reflectionType->implementsInterface('TYPO3\\CMS\\Core\\Type\\TypeInterface');
    }

BTW: Tested with PHP 5.3 and PHP 5.4

Reviews 1