[wp-trac] [WordPress Trac] #18488: set_transient crashes when value parameter is a SimpleXMLElement object

WordPress Trac wp-trac at lists.automattic.com
Sat Aug 20 03:58:34 UTC 2011


#18488: set_transient crashes when value parameter is a SimpleXMLElement object
--------------------------+------------------------------
 Reporter:  bobbingwide   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Cache         |     Version:  3.2.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by dd32):

 Did some googling:
 http://stackoverflow.com/questions/2970957/how-to-serialize-unserialize-a
 -simplexml-object
 {{{
 $s = new SimpleXmlElement('<foo>bar</foo>');
 $ss = serialize($s);
 $su = unserialize($ss);
 }}}
 Results in:  Fatal error: Uncaught exception 'Exception' with message
 'Serialization of 'SimpleXMLElement' is not allowed'

 End result? You can't store a SimpleXML object serialized.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18488#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list