Project

General

Profile

Bug #46049 ยป bug46049.diff

Proposed patch - Sven Carstens, 2016-04-20 17:01

View differences:

typo3/sysext/extbase/Classes/Service/Exception.php
<?php
namespace TYPO3\CMS\Extbase\Service;
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
class Exception extends \TYPO3\CMS\Extbase\Exception {
}
typo3/sysext/extbase/Classes/Service/Exception/CannotCreateReferencesFromStringOffsetsException.php
<?php
namespace TYPO3\CMS\Extbase\Service\Exception;
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
/**
* An "CannotCreateReferencesFromStringOffsets" exception.
*
* This exception will get thrown instead of running into a fatal error.
* Fatal error: Cannot create references to/from string offsets nor overloaded objects
*/
class CannotCreateReferencesFromStringOffsetsException extends \TYPO3\CMS\Extbase\Security\Exception {
}
typo3/sysext/extbase/Classes/Service/FlexFormService.php
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Extbase\Service\Exception\CannotCreateReferencesFromStringOffsetsException;
/**
* Utilities to process flexForms
......
* @param string $languagePointer language pointer used in the flexForm
* @param string $valuePointer value pointer used in the flexForm
* @return array the processed array
* @throws \TYPO3\CMS\Extbase\Service\Exception\CannotCreateReferencesFromStringOffsetsException
*/
public function convertFlexFormContentToArray($flexFormContent, $languagePointer = 'lDEF', $valuePointer = 'vDEF')
{
......
$valueKeyParts = explode('.', $valueKey);
$currentNode = &$settings;
foreach ($valueKeyParts as $valueKeyPart) {
$currentNode = &$currentNode[$valueKeyPart];
if (!is_string($currentNode[$valueKeyPart])) {
$currentNode = &$currentNode[$valueKeyPart];
} else {
throw new CannotCreateReferencesFromStringOffsetsException('Cannot create references to/from string offsets for key '.$valueKey.' at keypart '.$valueKeyPart.' .');
}
}
if (is_array($valueDefinition)) {
if (array_key_exists($valuePointer, $valueDefinition)) {
    (1-1/1)