maybe_unserialize( string $original )
Unserialize value only if it was serialized.
Description Description
Parameters Parameters
- $original
-
(string) (Required) Maybe unserialized original, if is needed.
Return Return
(mixed) Unserialized data can be any type.
Source Source
File: wp-includes/functions.php
function maybe_unserialize( $original ) { if ( is_serialized( $original ) ) { // don't attempt to unserialize data that wasn't serialized going in return @unserialize( $original ); } return $original; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |