[TYPO3-core] RFC: #3725: impexp has problem with flexform
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Fri Jun 30 11:24:38 CEST 2006
Franz Holzinger schrieb:
> This is a CVS patch request.
>
> Most of the stuff below is taken from
> http://bugs.typo3.org/view.php?id=3725
>
> Branches: 4.0
>
> Type: Bugfix
>
> Description:
> The import with impexp causes a problem which comes from a string wrongly used as an array in PHP5. The import tool does not inform the user about warning messages in the T3D file.
>
> These patches can solve this.
>
> The error occurs when the flexform has:
>
> $xmlData <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
> <T3FlexForms>
> <meta>
> </meta>
> <data>
You try to capture this with this test:
if (strcmp($editData['meta'],'')) {
$editData['meta'] = array();
}
But what happens when I have this:
<meta>foobar</meta>
Now meta is not an empty string but still no array which seem to be a problem.
How about to catch the condition like this:
// empty or invalid <meta>
if (!is_array($editData['meta'])) {
$editData['meta'] = array();
}
I don't get why you do an fgets() here:
} else $this->error('File read error: Warning message in file.
('.$initStr.fgets($fd).')');
Masi
More information about the TYPO3-team-core
mailing list