[TYPO3-core] RFC: non-existing or empty <meta> in T3FlexForms may cause errors in tceforms

Dmitry Dulepov dmitry at typo3.org
Wed Oct 18 20:40:24 CEST 2006


Hi!

Franz Holzinger wrote:
> when you have had
>   <meta>
>   </meta>
> in the xml file before then I think the function
> t3lib_div::xml2array($xmlData) should already have returned a
> $editData['meta'] as an empty array.

No, because it does not have `type="array"`. So it will be of type cdata 
and will be returned as string.

> And when there is no meta tag at all then an error message should be
> shown. Or when does it happen to have a <T3FlexForms> without meta tags?

It is possible to create such structure. See bug report for example.

In fact existing code works if <meta> exists but not as array. Mine 
fixes a case when it does not exist at all:

>> -			} elseif (isset($editData['meta']) && !is_array($editData['meta']))	{
>> +			} elseif (!isset($editData['meta']) || !is_array($editData['meta']))	{


-- 
Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)



More information about the TYPO3-team-core mailing list