Pages

Thursday, October 3, 2013

Uncaught exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed'

You have to cast the XML data to a string because internally they are all SimpleXMLElement


$event['mov'][$y]['name'] = (string)$child->name;
$event['mov'][$y]['movie_id'] = (string)$child->venues->venue->attributes()->id;
$event['mov'][$y]['description'] = (string)$child->description;

1 comment:

Anonymous said...

Thank you very much. This simple post solved my problem!