Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wordfenc.../modules/login-se.../classes/utility
File: serialization.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace WordfenceLS;
[2] Fix | Delete
[3] Fix | Delete
use RuntimeException;
[4] Fix | Delete
[5] Fix | Delete
class Utility_Serialization {
[6] Fix | Delete
[7] Fix | Delete
public static function unserialize($data, $options = array(), $validator = null) {
[8] Fix | Delete
static $serializedFalse;
[9] Fix | Delete
if ($serializedFalse === null)
[10] Fix | Delete
$serializedFalse = serialize(false);
[11] Fix | Delete
if ($data === $serializedFalse)
[12] Fix | Delete
return false;
[13] Fix | Delete
if (!is_serialized($data))
[14] Fix | Delete
throw new RuntimeException('Input data is not serialized');
[15] Fix | Delete
if (version_compare(PHP_VERSION, '5.6', '<=')) {
[16] Fix | Delete
$unserialized = @unserialize($data);
[17] Fix | Delete
}
[18] Fix | Delete
else {
[19] Fix | Delete
$unserialized = @unserialize($data, $options);
[20] Fix | Delete
}
[21] Fix | Delete
if ($unserialized === false)
[22] Fix | Delete
throw new RuntimeException('Deserialization failed');
[23] Fix | Delete
if ($validator !== null && !$validator($unserialized))
[24] Fix | Delete
throw new RuntimeException('Validation of unserialized data failed');
[25] Fix | Delete
return $unserialized;
[26] Fix | Delete
}
[27] Fix | Delete
[28] Fix | Delete
}
[29] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function