mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 15:16:30 +02:00
Merge pull request #3028 from Deltik/fix-3027
Fixes #3026. PHP 7.2 consistency hack in xmlClass::xml2array()
This commit is contained in:
@@ -561,16 +561,17 @@ class xmlClass
|
||||
//loop through tags
|
||||
foreach ($tags as $tag)
|
||||
{
|
||||
if(is_int($tag)) continue;
|
||||
switch($tag)
|
||||
{
|
||||
case '@attributes':
|
||||
$tmp = (array) $xml->attributes();
|
||||
$ret['@attributes'] = $tmp['@attributes'];
|
||||
|
||||
if($count_tags == 1) //only attributes & possible value
|
||||
if($count_tags == 1 || ['@attributes', 0] === $tags) //only attributes & possible value
|
||||
{
|
||||
$ret[$this->_optValueKey] = trim((string) $xml);
|
||||
return $ret;
|
||||
//return $ret;
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user