protected tryUnserialize ( string $value ) : mixed | ||
$value | string | The string to process. |
return | mixed |
protected function tryUnserialize($value)
{
if (!is_array($value) && substr($value, 0, 2) == 'a:') {
$unSerialized = unserialize($value);
}
if (isset($unSerialized) && is_array($unSerialized)) {
return $unSerialized;
}
return $value;
}