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
File: HttpClient.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Nextend\Framework\Misc;
[2] Fix | Delete
[3] Fix | Delete
use Nextend\Framework\Notification\Notification;
[4] Fix | Delete
use Nextend\Framework\Request\Request;
[5] Fix | Delete
[6] Fix | Delete
class HttpClient {
[7] Fix | Delete
[8] Fix | Delete
public static function getCacertPath() {
[9] Fix | Delete
return dirname(__FILE__) . '/cacert.pem';
[10] Fix | Delete
}
[11] Fix | Delete
[12] Fix | Delete
public static function get($url, $options = array()) {
[13] Fix | Delete
$options = array_merge(array('user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36'), $options);
[14] Fix | Delete
[15] Fix | Delete
$request = wp_remote_get($url, $options);
[16] Fix | Delete
if (is_wp_error($request)) {
[17] Fix | Delete
foreach ($request->get_error_messages() as $errorMessage) {
[18] Fix | Delete
Notification::error($errorMessage);
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
return false;
[22] Fix | Delete
} else {
[23] Fix | Delete
$data = wp_remote_retrieve_body($request);
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
return $data;
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
private static function parseHeaders(array $headers, $header = null) {
[30] Fix | Delete
}
[31] Fix | Delete
}
[32] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function