WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #24023, comment 7


Ignore:
Timestamp:
04/10/13 18:59:20 (12 months ago)
Author:
tivnet
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24023, comment 7

    initial v1  
    11That's right Sergey, I added is_string to speed up. 
     2 
    23Even if there was no speed improvement, the code would be tiny and clean. 
     4 
     5{{{ 
     6function is_serialized($data) { 
     7        return is_string($data) && ($data === "b:0;" || @unserialize($data) !== false); 
     8} 
     9}}} 
     10 
     11 
    312Thank you!