From f30339a7025f45dfec455f5e5488925a643673d5 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Sun, 23 Oct 2016 13:13:23 +0200 Subject: [PATCH] Starting from php 7.0.11 there is a bc break bugfix in the simplexml parser, the new behaviour is more strict. Reported in https://bugs.php.net/bug.php?id=73379&thanks=4 --- src/JMS/Serializer/XmlDeserializationVisitor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/JMS/Serializer/XmlDeserializationVisitor.php b/src/JMS/Serializer/XmlDeserializationVisitor.php index ad47d3ff2..a13f1baca 100644 --- a/src/JMS/Serializer/XmlDeserializationVisitor.php +++ b/src/JMS/Serializer/XmlDeserializationVisitor.php @@ -150,7 +150,8 @@ public function visitArray($data, array $type, Context $context) $namespace = isset($classMetadata->xmlNamespaces[''])?$classMetadata->xmlNamespaces['']:$namespace; } - if ( ! isset($data->$entryName) ) { + $hasNode = null !== $namespace ? isset($data->children($namespace)->$entryName) : isset($data->$entryName); + if (false === $hasNode) { if (null === $this->result) { return $this->result = array(); }