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/clone/wp-conte.../plugins/wordpres.../admin/tracking
File: class-tracking-server-data.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Admin\Tracking
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Represents the server data.
[8] Fix | Delete
*/
[9] Fix | Delete
class WPSEO_Tracking_Server_Data implements WPSEO_Collection {
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* Returns the collection data.
[13] Fix | Delete
*
[14] Fix | Delete
* @return array The collection data.
[15] Fix | Delete
*/
[16] Fix | Delete
public function get() {
[17] Fix | Delete
return [
[18] Fix | Delete
'server' => $this->get_server_data(),
[19] Fix | Delete
];
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* Returns the values with server details.
[24] Fix | Delete
*
[25] Fix | Delete
* @return array Array with the value.
[26] Fix | Delete
*/
[27] Fix | Delete
protected function get_server_data() {
[28] Fix | Delete
$server_data = [];
[29] Fix | Delete
[30] Fix | Delete
// Validate if the server address is a valid IP-address.
[31] Fix | Delete
$ipaddress = isset( $_SERVER['SERVER_ADDR'] ) ? filter_var( wp_unslash( $_SERVER['SERVER_ADDR'] ), FILTER_VALIDATE_IP ) : '';
[32] Fix | Delete
if ( $ipaddress ) {
[33] Fix | Delete
$server_data['ip'] = $ipaddress;
[34] Fix | Delete
$server_data['Hostname'] = gethostbyaddr( $ipaddress );
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
$server_data['os'] = function_exists( 'php_uname' ) ? php_uname() : PHP_OS;
[38] Fix | Delete
$server_data['PhpVersion'] = PHP_VERSION;
[39] Fix | Delete
$server_data['CurlVersion'] = $this->get_curl_info();
[40] Fix | Delete
$server_data['PhpExtensions'] = $this->get_php_extensions();
[41] Fix | Delete
[42] Fix | Delete
return $server_data;
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
/**
[46] Fix | Delete
* Returns details about the curl version.
[47] Fix | Delete
*
[48] Fix | Delete
* @return array|null The curl info. Or null when curl isn't available..
[49] Fix | Delete
*/
[50] Fix | Delete
protected function get_curl_info() {
[51] Fix | Delete
if ( ! function_exists( 'curl_version' ) ) {
[52] Fix | Delete
return null;
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
$curl = curl_version();
[56] Fix | Delete
[57] Fix | Delete
$ssl_support = true;
[58] Fix | Delete
if ( ! $curl['features'] && CURL_VERSION_SSL ) {
[59] Fix | Delete
$ssl_support = false;
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
return [
[63] Fix | Delete
'version' => $curl['version'],
[64] Fix | Delete
'sslSupport' => $ssl_support,
[65] Fix | Delete
];
[66] Fix | Delete
}
[67] Fix | Delete
[68] Fix | Delete
/**
[69] Fix | Delete
* Returns a list with php extensions.
[70] Fix | Delete
*
[71] Fix | Delete
* @return array Returns the state of the php extensions.
[72] Fix | Delete
*/
[73] Fix | Delete
protected function get_php_extensions() {
[74] Fix | Delete
return [
[75] Fix | Delete
'imagick' => extension_loaded( 'imagick' ),
[76] Fix | Delete
'filter' => extension_loaded( 'filter' ),
[77] Fix | Delete
'bcmath' => extension_loaded( 'bcmath' ),
[78] Fix | Delete
'pcre' => extension_loaded( 'pcre' ),
[79] Fix | Delete
'xml' => extension_loaded( 'xml' ),
[80] Fix | Delete
'pdo_mysql' => extension_loaded( 'pdo_mysql' ),
[81] Fix | Delete
];
[82] Fix | Delete
}
[83] Fix | Delete
}
[84] Fix | Delete
[85] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function