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/smart-sl.../Nextend/Framewor.../Misc/Base64
File: Decoder.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Nextend\Framework\Misc\Base64;
[2] Fix | Delete
[3] Fix | Delete
class Decoder {
[4] Fix | Delete
[5] Fix | Delete
public static function decode($data) {
[6] Fix | Delete
[7] Fix | Delete
if (function_exists('base64_decode')) {
[8] Fix | Delete
return base64_decode($data);
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
return self::decodeShim($data);
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
private static function decodeShim($input) {
[15] Fix | Delete
$keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
[16] Fix | Delete
$i = 0;
[17] Fix | Delete
$output = "";
[18] Fix | Delete
[19] Fix | Delete
// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
[20] Fix | Delete
$filter = $input;
[21] Fix | Delete
$input = preg_replace("[^A-Za-z0-9\+\/\=]", "", $input);
[22] Fix | Delete
if ($filter != $input) {
[23] Fix | Delete
return false;
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
do {
[27] Fix | Delete
$enc1 = strpos($keyStr, substr($input, $i++, 1));
[28] Fix | Delete
$enc2 = strpos($keyStr, substr($input, $i++, 1));
[29] Fix | Delete
$enc3 = strpos($keyStr, substr($input, $i++, 1));
[30] Fix | Delete
$enc4 = strpos($keyStr, substr($input, $i++, 1));
[31] Fix | Delete
$chr1 = ($enc1 << 2) | ($enc2 >> 4);
[32] Fix | Delete
$chr2 = (($enc2 & 15) << 4) | ($enc3 >> 2);
[33] Fix | Delete
$chr3 = (($enc3 & 3) << 6) | $enc4;
[34] Fix | Delete
$output = $output . chr((int)$chr1);
[35] Fix | Delete
if ($enc3 != 64) {
[36] Fix | Delete
$output = $output . chr((int)$chr2);
[37] Fix | Delete
}
[38] Fix | Delete
if ($enc4 != 64) {
[39] Fix | Delete
$output = $output . chr((int)$chr3);
[40] Fix | Delete
}
[41] Fix | Delete
} while ($i < strlen($input));
[42] Fix | Delete
[43] Fix | Delete
return urldecode($output);
[44] Fix | Delete
}
[45] Fix | Delete
}
[46] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function