Project

General

Profile

Actions

Bug #78752

closed

xml2Array should trim() value before processing

Added by Christian Kuhn over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2016-11-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

Annoying, especially in unit tests:

            'pi_flexform' => '
                <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
                <T3FlexForms>
                    <data>
                        <sheet index="sDEF">
                            <language index="lDEF">
                                <field index="settings.persistenceIdentifier">
                                    <value index="vDEF">egon</value>
                                </field>
                            </language>
                        </sheet>
                    </data>
                </T3FlexForms>
            ',

above does NOT work.

            'pi_flexform' => '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
                <T3FlexForms>
                    <data>
                        <sheet index="sDEF">
                            <language index="lDEF">
                                <field index="settings.persistenceIdentifier">
                                    <value index="vDEF">egon</value>
                                </field>
                            </language>
                        </sheet>
                    </data>
                </T3FlexForms>
            ',

works.

Actions #1

Updated by Christian Kuhn over 7 years ago

it is true that there shouldn't be anything before the <xml declaration ... but still ... it would be much nicer if GeneralUtility::xml2array would just trim the string before proceeding.

Actions #2

Updated by Gerrit Code Review over 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50716

Actions #3

Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50717

Actions #4

Updated by Anja Leichsenring over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF