[wp-trac] [WordPress Trac] #45895: maybe_unserialize: handle exceptions thrown during unserialization

WordPress Trac noreply at wordpress.org
Tue Mar 12 14:50:54 UTC 2019


#45895: maybe_unserialize: handle exceptions thrown during unserialization
-------------------------------------------------+-------------------------
 Reporter:  bluefuton                            |       Owner:  desrosj
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.2
Component:  General                              |     Version:  5.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests reporter-   |     Focuses:
  feedback close 2nd-opinion                     |
-------------------------------------------------+-------------------------

Comment (by earnjam):

 I'd just add to that, why would you serialize a `SimpleXMLElement`?

 If you need it in string format, couldn't you just convert it back to XML
 using `SimpleXMLElement::asXML`?

 http://php.net/manual/en/simplexmlelement.asxml.php

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45895#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list