hubzilla issue #1119 - xml2array has issues with some unicode sequences/conversions. Working around it using the older simplexml parser until it can be debugged, as Diaspora does not use complex XML with namespaces; which is where we need the more advaced capabilities of xml2array.
This commit is contained in:
parent
aa15867c95
commit
e841e48258
@ -648,6 +648,7 @@ function parse_xml_string($s, $strict = true) {
|
|||||||
|
|
||||||
libxml_use_internal_errors(true);
|
libxml_use_internal_errors(true);
|
||||||
|
|
||||||
|
|
||||||
$x = @simplexml_load_string($s2);
|
$x = @simplexml_load_string($s2);
|
||||||
if($x === false) {
|
if($x === false) {
|
||||||
logger('libxml: parse: error: ' . $s2, LOGGER_DATA);
|
logger('libxml: parse: error: ' . $s2, LOGGER_DATA);
|
||||||
@ -661,6 +662,16 @@ function parse_xml_string($s, $strict = true) {
|
|||||||
return $x;
|
return $x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function sxml2array ( $xmlObject, $out = array () )
|
||||||
|
{
|
||||||
|
foreach ( (array) $xmlObject as $index => $node )
|
||||||
|
$out[$index] = ( is_object ( $node ) ) ? sxml2array ( $node ) : $node;
|
||||||
|
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Scales an external image.
|
* @brief Scales an external image.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user