Closed (works as designed)
Project:
Drupal core
Version:
8.3.x-dev
Component:
serialization.module
Priority:
Normal
Category:
Support request
Assigned:
Issue tags:
Reporter:
Created:
3 Jul 2017 at 12:21 UTC
Updated:
21 Sep 2017 at 21:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
janmejaya commentedComment #4
janmejaya commentedThe path was not correct, so I modified the proper path and uploaded the patch.
Comment #6
janmejaya commentedAs per code-sniffer comment updated the patch.
Comment #7
janmejaya commentedComment #9
wim leersThis was last changed in #2685097: Fatal error: Call to a member function normalize() on a non-object in XmlEncoder when encoding into xml and there are embedded objects in the response, to fix a fatal PHP error.
It's possible this is a regression, but to determine that, we need steps to reproduce at minimum.
Finally, this is definitely not critical, because it only affects a tiny fraction of Drupal 8 sites at most.
Comment #10
wim leersComment #11
wim leersActually, this is very likely answered by #2685097-37: Fatal error: Call to a member function normalize() on a non-object in XmlEncoder when encoding into xml and there are embedded objects in the response + #2685097-38: Fatal error: Call to a member function normalize() on a non-object in XmlEncoder when encoding into xml and there are embedded objects in the response.
Comment #12
janmejaya commentedDuring decode function call we need to follow the following steps to fix this issue:
setBaseEncoder(new BaseXmlEncoder());
$XmlEncoder->decode($xml_data, 'array');
So no need to modify the drupal core.
Comment #13
damiankloip commentedIdeally, you shouldn't use the XML encoder directly. It's meant to be used as a part of the serializer.
Comment #14
jhedstromI've added #2910682: Mark serializer encoders @internal to make this more clear that the encoder service shouldn't be used directly.