[wp-trac] [WordPress Trac] #46570: the is_serialized function couldn't tell e+n

WordPress Trac noreply at wordpress.org
Wed Jul 31 12:49:05 UTC 2019


#46570: the is_serialized function couldn't tell e+n
----------------------------------------+-----------------------------
 Reporter:  hoythan                     |       Owner:  SergeyBiryukov
     Type:  defect (bug)                |      Status:  reviewing
 Priority:  normal                      |   Milestone:  5.3
Component:  General                     |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:
----------------------------------------+-----------------------------

Comment (by killerbishop):

 @donmhico - I don't know the full history on why this check is needed -
 but if client code does not always include a direct follow-up call to
 `unserialize()` - unpacking objects - especially ones with expensive
 `__wakeup()` routines - would be a reason to manually inspect this way.
 Another reason maybe to avoid any annoying `E_NOTICE` that would get
 triggered (though that could be suppressed).

 With PHP 7.1, I suppose the class instantiation cost could be mitigated
 with the ''allowed_classes'' option being set to `false`. For older PHP
 version support - it would still need to have something like this routine
 though.

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


More information about the wp-trac mailing list