1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 01:25:01 +02:00

Issue #3524 XML import/export array issue.

This commit is contained in:
Cameron
2018-11-15 14:20:08 -08:00
parent 747776b66a
commit e0d988aaeb
3 changed files with 7 additions and 12 deletions

View File

@@ -863,8 +863,12 @@ class xmlClass
if(is_array($val))
{
// $val = "<![CDATA[".e107::serialize($val,false)."]]>";
$val = e107::serialize($val,false);
if($val === null)
{
return '<![CDATA[array ()]]>';
}
}
if($this->convertFilePaths)
@@ -873,15 +877,11 @@ class xmlClass
$val = preg_replace_callback("#({e_.*?\.(".$types."))#i", array($this,'replaceFilePaths'), $val);
}
if((strpos($val,"<")!==FALSE) || (strpos($val,">")!==FALSE) || (strpos($val,"&")!==FALSE))
{
return "<![CDATA[". $val."]]>";
}
$val = str_replace(chr(1),'{\u0001}',$val);
return $val;