mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Convert::recursiveXMLToArray() did not always check if the passed in XML is an object before calling get_class() on it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@81894 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b2374aabe6
commit
092108115d
@ -230,7 +230,7 @@ class Convert extends Object {
|
||||
}
|
||||
|
||||
protected static function recursiveXMLToArray($xml) {
|
||||
if (get_class($xml) == 'SimpleXMLElement') {
|
||||
if(is_object($xml) && get_class($xml) == 'SimpleXMLElement') {
|
||||
$attributes = $xml->attributes();
|
||||
foreach($attributes as $k=>$v) {
|
||||
if ($v) $a[$k] = (string) $v;
|
||||
|
Loading…
x
Reference in New Issue
Block a user